function TestDiscoveryTest::testTestInfoParserMissingGroup
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()
- 10 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()
- 9 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()
- 8.9.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testTestInfoParserMissingGroup()
Tests for missing #[Group] attribute.
Attributes
#[RunInSeparateProcess]
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ TestDiscoveryTest.php, line 122
Class
- TestDiscoveryTest
- Unit tests for test discovery.
Namespace
Drupal\Tests\Core\TestCode
public function testTestInfoParserMissingGroup() : void {
$this->expectException(MissingGroupException::class);
$this->expectExceptionMessage('Missing group metadata in test Drupal\\Tests\\Core\\Foo\\MissingAttributesTest::testNoMetadata');
$configurationFilePath = $this->root . \DIRECTORY_SEPARATOR . 'core';
$phpUnitTestDiscovery = PhpUnitTestDiscovery::instance()->setConfigurationFilePath($configurationFilePath);
$phpUnitTestDiscovery->getTestClasses(NULL, [], $this->root . \DIRECTORY_SEPARATOR . 'core/tests/fixtures/test_driver/MissingAttributesTest.php');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.