You are here

public function PHP_CodeCoverage_Report_Node_File::getNumTestedFunctions in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php \PHP_CodeCoverage_Report_Node_File::getNumTestedFunctions()

Returns the number of tested functions.

Return value

int

Overrides PHP_CodeCoverage_Report_Node::getNumTestedFunctions

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php, line 333

Class

PHP_CodeCoverage_Report_Node_File
Represents a file in the code coverage information tree.

Code

public function getNumTestedFunctions() {
  if ($this->numTestedFunctions === null) {
    $this->numTestedFunctions = 0;
    foreach ($this->functions as $function) {
      if ($function['executableLines'] > 0 && $function['coverage'] == 100) {
        $this->numTestedFunctions++;
      }
    }
  }
  return $this->numTestedFunctions;
}