From 66ddfda7a211d0c8dbba8d622fe08918a0fbfe15 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Thu, 26 Jun 2008 21:07:59 +0000
Subject: [PATCH] - Patch #274994 by R.Muilwijk, boombatower: bring back the
 includes-tests.

---
 includes/{ => tests}/bootstrap.test  | 0
 includes/{ => tests}/common.test     | 0
 includes/{ => tests}/registry.test   | 0
 includes/{ => tests}/xmlrpc.test     | 0
 modules/simpletest/simpletest.module | 5 +++++
 5 files changed, 5 insertions(+)
 rename includes/{ => tests}/bootstrap.test (100%)
 rename includes/{ => tests}/common.test (100%)
 rename includes/{ => tests}/registry.test (100%)
 rename includes/{ => tests}/xmlrpc.test (100%)

diff --git a/includes/bootstrap.test b/includes/tests/bootstrap.test
similarity index 100%
rename from includes/bootstrap.test
rename to includes/tests/bootstrap.test
diff --git a/includes/common.test b/includes/tests/common.test
similarity index 100%
rename from includes/common.test
rename to includes/tests/common.test
diff --git a/includes/registry.test b/includes/tests/registry.test
similarity index 100%
rename from includes/registry.test
rename to includes/tests/registry.test
diff --git a/includes/xmlrpc.test b/includes/tests/xmlrpc.test
similarity index 100%
rename from includes/xmlrpc.test
rename to includes/tests/xmlrpc.test
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module
index ee072c275630..4d041492b916 100644
--- a/modules/simpletest/simpletest.module
+++ b/modules/simpletest/simpletest.module
@@ -427,6 +427,10 @@ function simpletest_get_all_tests() {
       }
     }
 
+    foreach (file_scan_directory('includes/tests', '\.test$') as $file) {
+      $files[] = $file->filename;
+    }
+
     $existing_classes = get_declared_classes();
     foreach ($files as $file) {
       include_once($file);
@@ -459,6 +463,7 @@ function simpletest_categorize_tests($tests) {
     $info = $instance->getInfo();
     $groups[$info['group']][$test] = $instance;
   }
+  uksort($groups, 'strnatcasecmp');
   return $groups;
 }
 
-- 
GitLab