diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index f87c79a..1beb719 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -521,27 +521,19 @@ function simpletest_classloader_register() { 'theme' => array('dir' => 'themes', 'extension' => 'info'), 'profile' => array('dir' => 'profiles', 'extension' => 'profile'), ); + $loader = drupal_classloader(); foreach ($types as $type => $info) { $matches = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.' . $info['extension'] . '$/', $info['dir']); foreach ($matches as $name => $file) { - drupal_classloader()->addDrupalExtension($name, dirname($file->uri)); - drupal_classloader()->addDrupalExtensionTests($name, dirname($file->uri)); + $loader->addDrupalExtension($name, dirname($file->uri)); + $loader->addDrupalExtensionTests($name, dirname($file->uri)); // While being there, prime drupal_get_filename(). drupal_get_filename($type, $name, $file->uri); } } // Register the core test directory so we can find \Drupal\UnitTestCase. - drupal_classloader()->add('Drupal\\Tests\\', DRUPAL_ROOT . '/core/tests'); - - // Manually register phpunit prefixes because they use a classmap instead of a - // prefix. This can be safely removed if we move to using composer's - // autoloader with a classmap. - drupal_classloader()->addMultiple(array( - 'PHPUnit' => DRUPAL_ROOT . '/core/vendor/phpunit/phpunit', - 'File_Iterator' => DRUPAL_ROOT . '/core/vendor/phpunit/php-file-iterator/', - 'PHP_Timer' => DRUPAL_ROOT . '/core/vendor/phpunit/php-timer/', - )); + $loader->add('Drupal\\Tests\\', DRUPAL_ROOT . '/core/tests'); } /**