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); }
public function endTestRun() { parent::endTestRun(); if ($this->out) { $this->out->write($this->logger->getXML()); $this->out->close(); } }
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); }
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); } }
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); } }