You are here

public function PHP_CodeCoverage_Report_XML_Project::getTests in Zircon Profile 8

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

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php, line 40

Class

PHP_CodeCoverage_Report_XML_Project
@since Class available since Release 2.0.0

Code

public function getTests() {
  $testsNode = $this
    ->getContextNode()
    ->getElementsByTagNameNS('http://schema.phpunit.de/coverage/1.0', 'tests')
    ->item(0);
  if (!$testsNode) {
    $testsNode = $this
      ->getContextNode()
      ->appendChild($this
      ->getDom()
      ->createElementNS('http://schema.phpunit.de/coverage/1.0', 'tests'));
  }
  return new PHP_CodeCoverage_Report_XML_Tests($testsNode);
}