Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 27 |
Report | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
72 | |
0.00% |
0 / 27 |
onTest($name, $success = TRUE, array $steps = array() | |
0.00% |
0 / 1 |
42 | |
0.00% |
0 / 20 |
|||
endRun() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
printResult($res) | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
<?php | |
namespace Codeception\PhpUnit\ResultPrinter; | |
class Report extends \Codeception\PHPUnit\ResultPrinter | |
{ | |
/** | |
* Handler for 'on test' event. | |
* | |
* @param string $name | |
* @param boolean $success | |
* @param array $steps | |
*/ | |
protected function onTest($name, $success = TRUE, array $steps = array(), $time = 0) | |
{ | |
if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) { | |
$status = "\033[41;37mFAIL\033[0m"; | |
} | |
else if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED) { | |
$status = 'Skipped'; | |
} | |
else if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE) { | |
$status = 'Incomplete'; | |
} else if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR) { | |
$status = 'ERROR'; | |
} else { | |
$status = 'Ok'; | |
} | |
if (strlen($name) > 75) $name = substr($name, 0, 70); | |
$line = $name . str_repeat('.', 75 - strlen($name)); | |
$line .= $status; | |
$this->write($line."\n"); | |
} | |
protected function endRun() | |
{ | |
$this->write("\nCodeception Results\n"); | |
$this->write(sprintf("Sucessful: %s. Failed: %s. Incomplete: %s. Skipped: %s", $this->successful, $this->failed, $this->skipped, $this->incomplete)."\n"); | |
} | |
public function printResult($res) { | |
} | |
} |