ReflectionClass $class:
ReflectionMethod $method:
protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method) {
$name = $method
->getName();
if ($this
->isPublicTestMethod($method)) {
$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));
}
else {
if ($this
->isTestMethod($method)) {
$this
->addTest(self::warning(sprintf('Test method "%s" in test class "%s" is not public.', $name, $class
->getName())));
}
}
}