public function PHP_CodeCoverage_Report_XML::process in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php \PHP_CodeCoverage_Report_XML::process()
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ XML.php, line 26
Class
- PHP_CodeCoverage_Report_XML
- @since Class available since Release 2.0.0
Code
public function process(PHP_CodeCoverage $coverage, $target) {
if (substr($target, -1, 1) != DIRECTORY_SEPARATOR) {
$target .= DIRECTORY_SEPARATOR;
}
$this->target = $target;
$this
->initTargetDirectory($target);
$report = $coverage
->getReport();
$this->project = new PHP_CodeCoverage_Report_XML_Project($coverage
->getReport()
->getName());
$this
->processTests($coverage
->getTests());
$this
->processDirectory($report, $this->project);
$index = $this->project
->asDom();
$index->formatOutput = true;
$index->preserveWhiteSpace = false;
$index
->save($target . '/index.xml');
}