function TestFileParserTest::testGetTestListFromFile

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testGetTestListFromFile()
  2. 8.9.x core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testGetTestListFromFile()
  3. 11.x core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testGetTestListFromFile()

@covers ::getTestListFromFile

File

core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php, line 83

Class

TestFileParserTest
@coversDefaultClass \Drupal\Core\Test\RunTests\TestFileParser @group Test @group RunTests

Namespace

Drupal\Tests\Core\Test\RunTests

Code

public function testGetTestListFromFile() : void {
    $parser = new TestFileParser();
    $this->assertEquals([
        'Drupal\\Tests\\Core\\Test\\RunTests\\TestFileParserTest',
    ], $parser->getTestListFromFile(__FILE__));
    $this->assertEquals([
        'Drupal\\KernelTests\\Core\\Datetime\\Element\\TimezoneTest',
    ], $parser->getTestListFromFile(__DIR__ . '/../../../../KernelTests/Core/Datetime/Element/TimezoneTest.php'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.