8 class ExtededTestdox extends \PHPUnit_Util_Printer implements \PHPUnit\Framework\TestListener
77 parent::__construct($out);
79 $this->prettifier = new \PHPUnit_Util_TestDox_NamePrettifier();
103 public function addError(\PHPUnit\Framework\Test $test, \Exception $e, $time)
105 if ($test instanceof $this->testTypeOfInterest) {
106 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR;
119 public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time)
121 if ($test instanceof $this->testTypeOfInterest) {
122 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE;
137 if ($test instanceof $this->testTypeOfInterest) {
138 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE;
152 public function addSkippedTest(\PHPUnit\Framework\Test $test, \Exception $e, $time)
154 if ($test instanceof $this->testTypeOfInterest) {
155 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED;
169 public function addRiskyTest(\PHPUnit\Framework\Test $test, \Exception $e, $time)
171 if ($test instanceof $this->testTypeOfInterest) {
172 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_RISKY;
204 public function startTest(\PHPUnit\Framework\Test $test)
206 if ($test instanceof $this->testTypeOfInterest) {
207 $class = get_class($test);
209 if ($this->testClass !=
$class) {
210 if ($this->testClass !=
'') {
214 $this->currentTestClassPrettified = $this->prettifier->prettifyTestClass(
$class);
217 $this->testClass =
$class;
221 $this->currentTestMethodPrettified = $this->prettifier->prettifyTestMethod($test->getName(
false));
223 $this->testStatus = \PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
233 public function endTest(\PHPUnit\Framework\Test $test, $time)
235 if ($test instanceof $this->testTypeOfInterest) {
236 if (!isset($this->
tests[$this->currentTestMethodPrettified])) {
240 if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
243 if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR) {
246 if ($this->testStatus == \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
250 $this->currentTestClassPrettified =
null;
251 $this->currentTestMethodPrettified =
null;
279 $this->write($this->currentTestClassPrettified .
' ');
299 $check =
$data[
'failure'] == 0 ?
' - [x] ' :
' - [ ] ';
302 0 ?
' (skipped)' :
'') . (
$data[
'time'] > 1 ?
' - ' . number_format(
addIncompleteTest(\PHPUnit\Framework\Test $test, \Exception $e, $time)
startTestSuite(\PHPUnit\Framework\TestSuite $suite)
$currentTestClassPrettified
$_option $_optionId $class
addError(\PHPUnit\Framework\Test $test, \Exception $e, $time)
addSkippedTest(\PHPUnit\Framework\Test $test, \Exception $e, $time)
endTestSuite(\PHPUnit\Framework\TestSuite $suite)
addRiskyTest(\PHPUnit\Framework\Test $test, \Exception $e, $time)
endTest(\PHPUnit\Framework\Test $test, $time)
addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time)
$currentTestMethodPrettified
startTest(\PHPUnit\Framework\Test $test)
if(!isset($_GET['name'])) $name