protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method)
{
if (!$this->isTestMethod($method)) {
return;
}
$name = $method->getName();
if (!$method->isPublic()) {
$this->addTest(self::warning(sprintf('Test method "%s" in test class "%s" is not public.', $name, $class->getName())));
return;
}
$test = self::createTest($class, $name);
if ($test instanceof PHPUnit_Framework_TestCase || $test instanceof PHPUnit_Framework_TestSuite_DataProvider) {
$test->setDependencies(PHPUnit_Util_Test::getDependencies($class->getName(), $name));
}
$this->addTest($test, PHPUnit_Util_Test::getGroups($class->getName(), $name));
}