File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,10 @@ public function register(Container $container): void
104
104
105
105
// class_alias is not supported by OptimizedDirectorySourceLocator or AutoloadSourceLocator,
106
106
// so we manually load this PHPUnit compatibility trait that exists in Drupal 8.
107
- if (file_exists ($ this ->drupalRoot . '/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php ' )) {
108
- require_once $ this ->drupalRoot . '/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php ' ;
107
+ $ phpunitCompatTraitFilepath = $ this ->drupalRoot . '/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php ' ;
108
+ if (file_exists ($ phpunitCompatTraitFilepath )) {
109
+ require_once $ phpunitCompatTraitFilepath ;
110
+ $ this ->autoloader ->addClassMap (['Drupal \\Tests \\PhpunitCompatibilityTrait ' => $ phpunitCompatTraitFilepath ]);
109
111
}
110
112
111
113
foreach ($ this ->moduleData as $ extension ) {
You can’t perform that action at this time.
0 commit comments