The XML markup used is the same as the one that is used by the JUnit Ant task.
상속: extends PHPUnit_Util_Printer, implements PHPUnit_Framework_TestListener
예제 #1
0
 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     if ($test instanceof \Codeception\TestCase\Cept) {
         $this->currentTestCase->setAttribute('name', $test->toString());
     }
     return parent::endTest($test, $time);
 }
예제 #2
0
 public function endTestRun()
 {
     parent::endTestRun();
     if ($this->out) {
         $this->out->write($this->logger->getXML());
         $this->out->close();
     }
 }
예제 #3
0
 public function endTest(\PHPUnit_Framework_Test $test, $time)
 {
     if ($this->attachCurrentTestCase and $test instanceof Test) {
         $numAssertions = $test->getNumAssertions();
         $this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions;
         $this->currentTestCase->setAttribute('assertions', $numAssertions);
     }
     parent::endTest($test, $time);
 }
예제 #4
0
 public function startTest(\PHPUnit_Framework_Test $test)
 {
     if (!$test instanceof Reported) {
         return parent::startTest($test);
     }
     $this->currentTestCase = $this->document->createElement('testcase');
     foreach ($test->getReportFields() as $attr => $value) {
         $this->currentTestCase->setAttribute($attr, $value);
     }
 }
예제 #5
0
 public function startTest(\PHPUnit_Framework_Test $test)
 {
     if (!$test instanceof Reported) {
         return parent::startTest($test);
     }
     $this->currentTestCase = $this->document->createElement('testcase');
     $isStrict = Configuration::config()['settings']['strict_xml'];
     foreach ($test->getReportFields() as $attr => $value) {
         if ($isStrict and !in_array($attr, $this->strictAttributes)) {
             continue;
         }
         $this->currentTestCase->setAttribute($attr, $value);
     }
 }