You are here

public function PHP_CodeCoverage_Report_XML_Node::addFile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php \PHP_CodeCoverage_Report_XML_Node::addFile()

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php, line 76

Class

PHP_CodeCoverage_Report_XML_Node
@since Class available since Release 2.0.0

Code

public function addFile($name, $href) {
  $fileNode = $this
    ->getDom()
    ->createElementNS('http://schema.phpunit.de/coverage/1.0', 'file');
  $fileNode
    ->setAttribute('name', $name);
  $fileNode
    ->setAttribute('href', $href);
  $this
    ->getContextNode()
    ->appendChild($fileNode);
  return new PHP_CodeCoverage_Report_XML_File($fileNode);
}