function Test::isTestMethod
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Event/Value/Test/Test.php \PHPUnit\Event\Code\Test::isTestMethod()
2 calls to Test::isTestMethod()
- TestCase::isCallableTestMethod in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php - TestSuite::fromClassReflector in vendor/
phpunit/ phpunit/ src/ Framework/ TestSuite.php
File
-
vendor/
phpunit/ phpunit/ src/ Util/ Test.php, line 23
Class
- Test
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\UtilCode
public static function isTestMethod(ReflectionMethod $method) : bool {
if (!$method->isPublic()) {
return false;
}
if (str_starts_with($method->getName(), 'test')) {
return true;
}
$metadata = Registry::parser()->forMethod($method->getDeclaringClass()
->getName(), $method->getName());
return $metadata->isTest()
->isNotEmpty();
}