$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";
if (is_dir($test_path)) { $this->
addTestFiles(TestDiscovery::
scanDirectory("Drupal\\Tests\\
$extension_name\\
$suite_namespace\\",
$test_path));
} } }}