function JunitXmlLogger::testSuiteStarted
File
-
vendor/
phpunit/ phpunit/ src/ Logging/ JUnit/ JunitXmlLogger.php, line 110
Class
- JunitXmlLogger
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Logging\JUnitCode
public function testSuiteStarted(Started $event) : void {
$testSuite = $this->document
->createElement('testsuite');
$testSuite->setAttribute('name', $event->testSuite()
->name());
if ($event->testSuite()
->isForTestClass()) {
$testSuite->setAttribute('file', $event->testSuite()
->file());
}
if ($this->testSuiteLevel > 0) {
$this->testSuites[$this->testSuiteLevel]
->appendChild($testSuite);
}
else {
$this->root
->appendChild($testSuite);
}
$this->testSuiteLevel++;
$this->testSuites[$this->testSuiteLevel] = $testSuite;
$this->testSuiteTests[$this->testSuiteLevel] = 0;
$this->testSuiteAssertions[$this->testSuiteLevel] = 0;
$this->testSuiteErrors[$this->testSuiteLevel] = 0;
$this->testSuiteFailures[$this->testSuiteLevel] = 0;
$this->testSuiteSkipped[$this->testSuiteLevel] = 0;
$this->testSuiteTimes[$this->testSuiteLevel] = 0;
}