diff --git a/docroot/modules/simpletest/simpletest.module b/docroot/modules/simpletest/simpletest.module
index f825755..d2e69ae 100644
--- a/docroot/modules/simpletest/simpletest.module
+++ b/docroot/modules/simpletest/simpletest.module
@@ -316,7 +316,7 @@ function simpletest_test_get_all() {
     }
     else {
       // Select all clases in files ending with .test.
-      $classes = db_query("SELECT name FROM {registry} WHERE type = :type AND filename LIKE :name", array(':type' => 'class', ':name' => '%.test'))->fetchCol();
+      $classes = db_query("SELECT r.name FROM {registry} r RIGHT JOIN {system} s ON r.module = s.name AND status = 1 WHERE r.type = :type AND r.filename LIKE :name", array(':type' => 'class', ':name' => '%.test'))->fetchCol();
 
       // Check that each class has a getInfo() method and store the information
       // in an array keyed with the group specified in the test information.
