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

Breadcrumb

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

class TestDoxBuilder

@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\Event\Code\TestDoxBuilder

Expanded class hierarchy of TestDoxBuilder

File

vendor/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php, line 21

Namespace

PHPUnit\Event\Code
View source
final class TestDoxBuilder {
    
    /**
     * @throws MoreThanOneDataSetFromDataProviderException
     */
    public static function fromTestCase(TestCase $testCase) : TestDox {
        $prettifier = new NamePrettifier();
        return new TestDox($prettifier->prettifyTestClassName($testCase::class), $prettifier->prettifyTestCase($testCase, false), $prettifier->prettifyTestCase($testCase, true));
    }
    
    /**
     * @psalm-param class-string $className
     * @psalm-param non-empty-string $methodName
     */
    public static function fromClassNameAndMethodName(string $className, string $methodName) : TestDox {
        $prettifier = new NamePrettifier();
        $prettifiedMethodName = $prettifier->prettifyTestMethodName($methodName);
        return new TestDox($prettifier->prettifyTestClassName($className), $prettifiedMethodName, $prettifiedMethodName);
    }

}

Members

Title Sort descending Modifiers Object type Summary
TestDoxBuilder::fromClassNameAndMethodName public static function @psalm-param class-string $className
@psalm-param non-empty-string $methodName
TestDoxBuilder::fromTestCase public static function
RSS feed
Powered by Drupal