function TestDiscoveryTest::testTestInfoParserMissingGroupWithDataProvider
Tests for missing #[Group] attribute in a test with DataProvider.
Attributes
#[RunInSeparateProcess]
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ TestDiscoveryTest.php, line 134
Class
- TestDiscoveryTest
- Unit tests for test discovery.
Namespace
Drupal\Tests\Core\TestCode
public function testTestInfoParserMissingGroupWithDataProvider() : void {
$this->expectException(MissingGroupException::class);
$this->expectExceptionMessage('Missing group metadata in test Drupal\\Tests\\Core\\Foo\\MissingAttributesWithDataProviderTest::testNoGroupMetadata#Test#1');
$configurationFilePath = $this->root . \DIRECTORY_SEPARATOR . 'core';
$phpUnitTestDiscovery = PhpUnitTestDiscovery::instance()->setConfigurationFilePath($configurationFilePath);
$phpUnitTestDiscovery->getTestClasses(NULL, [], $this->root . \DIRECTORY_SEPARATOR . 'core/tests/fixtures/test_driver/MissingAttributesWithDataProviderTest.php');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.