You are here

public function TestDiscoveryTest::testTestInfoParserMissingGroup in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()
  2. 9 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()

@covers ::getTestInfo

File

core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php, line 206

Class

TestDiscoveryTest
@coversDefaultClass \Drupal\Core\Test\TestDiscovery @group Test

Namespace

Drupal\Tests\Core\Test

Code

public function testTestInfoParserMissingGroup() {
  $classname = 'Drupal\\KernelTests\\field\\BulkDeleteTest';
  $doc_comment = <<<EOT
/**
 * Bulk delete storages and fields, and clean up afterwards.
 */
EOT;
  $this
    ->expectException(MissingGroupException::class);
  $this
    ->expectExceptionMessage('Missing @group annotation in Drupal\\KernelTests\\field\\BulkDeleteTest');
  TestDiscovery::getTestInfo($classname, $doc_comment);
}