// Prevent expensive class loader lookups for each reflected test class by
// registering the complete classmap of test classes to the class loader.
// This also ensures that test classes are loaded from the discovered
// pathnames; a namespace/classname mismatch will throw an exception.
$this->classLoader->
addClassMap($classmap);
foreach ($classmap as $classname =>
$pathname) { $finder = MockFileFinder::
create($pathname);
$parser =
new StaticReflectionParser($classname,
$finder, TRUE
);
try { $info =
static::
getTestInfo($classname,
$parser->
getDocComment());
} catch (MissingGroupException
$e) { // If the class name ends in Test and is not a migrate table dump.
if (preg_match('/Test$/',
$classname) && !
str_contains($classname, 'migrate_drupal\Tests\Table'
)) { throw $e;
} // If the class is @group annotation just skip it. Most likely it is an
// abstract class, trait or test fixture.
continue;
} foreach ($info['groups'
] as $group) {