Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/INSTALL.txt,v
retrieving revision 1.6.4.14
diff -u -p -r1.6.4.14 INSTALL.txt
--- INSTALL.txt	13 Mar 2009 03:28:03 -0000	1.6.4.14
+++ INSTALL.txt	21 Mar 2009 14:44:12 -0000
@@ -33,34 +33,21 @@ INSTALLATION
    }
 
 3. (Optional)
-   If there are any test modules they will be displayed on the admin modules
-   page (admin/build/modules) unless the following code is added to
-   modules/system/system.admin.inc in system_modules() just after:
-   "$files = module_rebuild_cache();".
-
-   // Remove hidden modules from display list.
-   foreach ($files as $filename => $file) {
-     if (!empty($file->info['hidden'])) {
-       unset($files[$filename]);
-     }
-   }
-
-4. (Optional)
    Apply the "Show fatal errors in tests" batch to misc/drupal.js if you want
    the reason for test failure to be displayed on the batch API screen. The
    patch can be found at:
    http://drupal.org/files/issues/simpletest_drupal.js_.patch.
 
-5. (Optional)
+4. (Optional)
    Move/Copy the run-tests.sh file into the Drupal scripts folder. The script
    allows the tests to be run from the command line.
 
-3. Go to Administer >> Site building >> Modules (admin/build/modules) and
+5. Go to Administer >> Site building >> Modules (admin/build/modules) and
    enable the SimpleTest module.
 
-4. Go to Administer >> Site building >> Testing (admin/build/testing) to
+6. Go to Administer >> Site building >> Testing (admin/build/testing) to
    begin using the module.
 
-5. (Optional)
+7. (Optional)
    Go to Administer >> Help >> SimpleTest (admin/help/simpletest)
    for more information on how to use the SimpleTest module.
Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.33.2.4.2.14
diff -u -p -r1.33.2.4.2.14 simpletest.module
--- simpletest.module	13 Mar 2009 03:18:38 -0000	1.33.2.4.2.14
+++ simpletest.module	21 Mar 2009 14:44:13 -0000
@@ -634,3 +634,22 @@ function simpletest_clean_results_table(
     drupal_set_message(t('Removed @count test results.', array('@count' => $count)));
   }
 }
+
+/**
+ * Implementation of hook_form_FORM_ID_alter().
+ *
+ * Hide modules that have 'hidden = TRUE' in their .info files.
+ */
+function simpletest_form_system_modules_alter(&$form, $form_state) {
+  foreach ($form['validation_modules']['#value'] as $filename => $file) {
+    if (!empty($file->info['hidden'])) {
+      unset($form['name'][$filename]);
+      unset($form['version'][$filename]);
+      unset($form['description'][$filename]);
+      unset($form['status']['#options'][$filename]);
+      unset($form['throttle']['#options'][$filename]);
+      unset($form['validation_modules']['#value'][$filename]);
+    }
+  }
+}
+
