public function PHP_CodeCoverage_Report_XML_Tests::addTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php \PHP_CodeCoverage_Report_XML_Tests::addTest()
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML/ Tests.php, line 32
Class
- PHP_CodeCoverage_Report_XML_Tests
- @since Class available since Release 2.0.0
Code
public function addTest($test, array $result) {
$node = $this->contextNode
->appendChild($this->contextNode->ownerDocument
->createElementNS('http://schema.phpunit.de/coverage/1.0', 'test'));
$node
->setAttribute('name', $test);
$node
->setAttribute('size', $result['size']);
$node
->setAttribute('result', (int) $result['status']);
$node
->setAttribute('status', $this->codeMap[(int) $result['status']]);
}