public function PHPUnit_Util_TestDox_ResultPrinter::endTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php \PHPUnit_Util_TestDox_ResultPrinter::endTest()
A test ended.
Parameters
PHPUnit_Framework_Test $test:
float $time:
Overrides PHPUnit_Framework_TestListener::endTest
File
- vendor/
phpunit/ phpunit/ src/ Util/ TestDox/ ResultPrinter.php, line 251
Class
- PHPUnit_Util_TestDox_ResultPrinter
- Base class for printers of TestDox documentation.
Code
public function endTest(PHPUnit_Framework_Test $test, $time) {
if (!$this
->isOfInterest($test)) {
return;
}
if (!isset($this->tests[$this->currentTestMethodPrettified])) {
if ($this->testStatus == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
$this->tests[$this->currentTestMethodPrettified]['success'] = 1;
$this->tests[$this->currentTestMethodPrettified]['failure'] = 0;
}
else {
$this->tests[$this->currentTestMethodPrettified]['success'] = 0;
$this->tests[$this->currentTestMethodPrettified]['failure'] = 1;
}
}
else {
if ($this->testStatus == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
$this->tests[$this->currentTestMethodPrettified]['success']++;
}
else {
$this->tests[$this->currentTestMethodPrettified]['failure']++;
}
}
$this->currentTestClassPrettified = null;
$this->currentTestMethodPrettified = null;
}