public function getTestClasses($extension = NULL, array
$types =
[]) { if (!
isset($extension) &&
empty($types)) { if (!
empty($this->testClasses
)) { return $this->testClasses;
} } $list =
[];
$classmap =
$this->
findAllClassFiles($extension);
// 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 {