diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 38c360b..af1fdf1 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -320,19 +320,12 @@ function simpletest_test_get_all() { // checks below will find them. simpletest_classloader_register(); - // Load test information from cache if available, otherwise retrieve the - // information from each tests getInfo() method. - if ($cache = cache()->get('simpletest')) { - $groups = $cache->data; - } - else { // Select all clases in files ending with .test. // @todo: Remove this once all tests have been ported to PSR-0. $classes = db_query("SELECT name FROM {registry} WHERE type = :type AND filename LIKE :name", array(':type' => 'class', ':name' => '%.test'))->fetchCol(); - // Select all PSR-0 classes in the Tests namespace of all modules. + // Find all PSR-0 classes in the Tests namespace of all modules. $system_list = db_query("SELECT name, filename FROM {system}")->fetchAllKeyed(); - foreach ($system_list as $name => $filename) { // Build directory in which the test files would reside. $tests_dir = DRUPAL_ROOT . '/' . dirname($filename) . '/lib/Drupal/' . $name . '/Tests'; @@ -383,8 +376,6 @@ function simpletest_test_get_all() { // Allow modules extending core tests to disable originals. drupal_alter('simpletest', $groups); - cache()->set('simpletest', $groups); - } } return $groups; } @@ -393,7 +384,7 @@ function simpletest_test_get_all() { * Registers namespaces for disabled modules. */ function simpletest_classloader_register() { - // Get the cached test modules list and register a test namespace for each. + // Register the namespaces of all modules that are not enabled. $disabled_modules = db_query("SELECT name, filename FROM {system} WHERE status = 0")->fetchAllKeyed(); if ($disabled_modules) { foreach ($disabled_modules as $name => $filename) {