protected function addTestsBySuiteNamespace($root,
$suite_namespace) { // Core's tests are in the namespace Drupal\{$suite_namespace}Tests\ and are
// always inside of core/tests/Drupal/{$suite_namespace}Tests. The exception
// to this is Unit tests for historical reasons.
if ($suite_namespace == 'Unit'
) { $tests = TestDiscovery::
scanDirectory("Drupal\\Tests\\", "
$root/core/tests/Drupal/Tests"
);
$tests =
array_flip(array_filter(array_flip($tests),
function D
$test_class) { // The Listeners directory does not contain tests. Use the class name
// to be compatible with all operating systems.
return !
preg_match('/^Drupal\\\\Tests\\\\Listeners\\\\/',
$test_class);
}));
$this->
addTestFiles($tests);
} else { $this->
addTestFiles(TestDiscovery::
scanDirectory("Drupal\\{
$suite_namespace}Tests\\", "
$root/core/tests/Drupal/{
$suite_namespace}Tests"
));
} // Extensions' tests will always be in the namespace
// Drupal\Tests\$extension_name\$suite_namespace\ and be in the
// $extension_path/tests/src/$suite_namespace directory. Not all extensions
// will have all kinds of tests.
foreach ($this->
findExtensionDirectories($root) as $extension_name =>
$dir) { $test_path = "
$dir/tests/src/
$suite_namespace";