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

Breadcrumb

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

function TestMethodBuilder::fromTestCase

Throws

MoreThanOneDataSetFromDataProviderException

1 call to TestMethodBuilder::fromTestCase()
AbstractPhpProcess::processChildResult in vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php

File

vendor/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php, line 37

Class

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

Namespace

PHPUnit\Event\Code

Code

public static function fromTestCase(TestCase $testCase) : TestMethod {
    $methodName = $testCase->name();
    assert(!empty($methodName));
    $location = Reflection::sourceLocationFor($testCase::class, $methodName);
    return new TestMethod($testCase::class, $methodName, $location['file'], $location['line'], TestDoxBuilder::fromTestCase($testCase), MetadataRegistry::parser()->forClassAndMethod($testCase::class, $methodName), self::dataFor($testCase));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal