public function PHPUnit_Framework_TestSuite::count in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/src/Framework/TestSuite.php \PHPUnit_Framework_TestSuite::count()
Counts the number of test cases that will be run by this test.
Parameters
bool $preferCache Indicates if cache is preferred.:
Return value
int
File
- vendor/
phpunit/ phpunit/ src/ Framework/ TestSuite.php, line 413
Class
- PHPUnit_Framework_TestSuite
- A TestSuite is a composite of Tests. It runs a collection of test cases.
Code
public function count($preferCache = false) {
if ($preferCache && $this->cachedNumTests != null) {
$numTests = $this->cachedNumTests;
}
else {
$numTests = 0;
foreach ($this as $test) {
$numTests += count($test);
}
$this->cachedNumTests = $numTests;
}
return $numTests;
}