/** * @param SimpleTestCase $testCase * @return integer * @since Method available since Release 2.11.1 */ public function countTestsInTestCase(SimpleTestCase $testCase) { $tests = $testCase->getTests(); $testCount = 0; if ($this->config->testsOnlySpecified()) { if ($this->config->testsOnlySpecifiedMethods) { foreach ($tests as $method) { if ($this->config->inMethodsToBeTested(get_class($testCase), $method)) { ++$testCount; } } } elseif ($this->config->testsOnlySpecifiedClasses) { if ($this->config->inClassesToBeTested(get_class($testCase))) { $testCount = count($tests); } } } else { $testCount = count($tests); } return $testCount; }
/** * @param string $testCase * @param string $method * @return boolean */ public function shouldInvoke($testCase, $method) { return $this->config->inClassesToBeTested($testCase); }