function Node::addFile
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ Xml/ Node.php, line 62
Class
- Node
- @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Namespace
SebastianBergmann\CodeCoverage\Report\XmlCode
public function addFile(string $name, string $href) : File {
$fileNode = $this->dom()
->createElementNS('https://schema.phpunit.de/coverage/1.0', 'file');
$fileNode->setAttribute('name', $name);
$fileNode->setAttribute('href', $href);
$this->contextNode()
->appendChild($fileNode);
return new File($fileNode);
}