function TestDiscoveryTest::testScanDirectoryNoAbstract
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testScanDirectoryNoAbstract()
- 8.9.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testScanDirectoryNoAbstract()
- 11.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::testScanDirectoryNoAbstract()
Ensure TestDiscovery::scanDirectory() ignores certain abstract file types.
@covers ::scanDirectory
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ TestDiscoveryTest.php, line 488
Class
- TestDiscoveryTest
- @coversDefaultClass \Drupal\Core\Test\TestDiscovery @group Test
Namespace
Drupal\Tests\Core\TestCode
public function testScanDirectoryNoAbstract() : void {
$this->setupVfsWithTestClasses();
$files = TestDiscovery::scanDirectory('Drupal\\Tests\\test_module\\Kernel\\', vfsStream::url('drupal/modules/test_module/tests/src/Kernel'));
$this->assertNotEmpty($files);
$this->assertArrayNotHasKey('Drupal\\Tests\\test_module\\Kernel\\KernelExampleTestBase', $files);
$this->assertArrayNotHasKey('Drupal\\Tests\\test_module\\Kernel\\KernelExampleTrait', $files);
$this->assertArrayNotHasKey('Drupal\\Tests\\test_module\\Kernel\\KernelExampleInterface', $files);
$this->assertArrayHasKey('Drupal\\Tests\\test_module\\Kernel\\KernelExampleTest3', $files);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.