/** * Calculates the incoming test cases. Skips abstract * and ignored classes. * @param array $candidates Candidate classes. * @return array New classes which are test * cases that shouldn't be ignored. * @access public */ function selectRunnableTests($candidates) { $classes = array(); foreach ($candidates as $class) { if (TestSuite::getBaseTestCase($class)) { $reflection = new SimpleReflection($class); if ($reflection->isAbstract()) { SimpleTest::ignore($class); } else { // only pick classes which do have test methods we can run: $methods = $reflection->getMethods(); foreach ($methods as $method) { if (SimpleTestCase::isTest($class, $method)) { $classes[] = $class; break; } } } } } return $classes; }