Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Test.php

class Test

Same name in this branch
  1. 11.1.x vendor/phpunit/phpunit/src/Framework/Attributes/Test.php \PHPUnit\Framework\Attributes\Test
  2. 11.1.x vendor/phpunit/phpunit/src/Metadata/Test.php \PHPUnit\Metadata\Test
  3. 11.1.x vendor/phpunit/phpunit/src/Event/Value/Test/Test.php \PHPUnit\Event\Code\Test

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This class is not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\Util\Test

Expanded class hierarchy of Test

2 files declare their use of Test
TestCase.php in vendor/phpunit/phpunit/src/Framework/TestCase.php
TestSuite.php in vendor/phpunit/phpunit/src/Framework/TestSuite.php
14 string references to 'Test'
AddAnnotatedClassesToCachePass::matchAnyRegexps in vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php
AnnotationParser::forMethod in vendor/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php
@psalm-param class-string $className @psalm-param non-empty-string $methodName
GuardTokenParser::parse in vendor/twig/twig/src/TokenParser/GuardTokenParser.php
Parses a token and returns a node.
NamePrettifier::prettifyTestClassName in vendor/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php
@psalm-param class-string $className
NamePrettifier::prettifyTestMethodName in vendor/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php

... See full list

File

vendor/phpunit/phpunit/src/Util/Test.php, line 21

Namespace

PHPUnit\Util
View source
final class Test {
    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();
    }

}

Members

Title Sort descending Modifiers Object type Summary
Test::isTestMethod public static function
RSS feed
Powered by Drupal