From e9d97f1eef493de9b9cb3ae456175ce33b5cb796 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 8 Jun 2009 09:23:55 +0000 Subject: - Patch #449198 by boombatower: cealn up test loading and related API. --- scripts/run-tests.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/run-tests.sh') diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 795c67886..ada07c75c 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -44,8 +44,11 @@ if ($args['clean']) { } // Load SimpleTest files. -$all_tests = simpletest_get_all_tests(); -$groups = simpletest_categorize_tests($all_tests); +$groups = simpletest_test_get_all(); +$all_tests = array(); +foreach ($groups as $group => $tests) { + $all_tests = array_merge($all_tests, array_keys($tests)); +} $test_list = array(); if ($args['list']) { @@ -54,8 +57,8 @@ if ($args['list']) { echo "-------------------------------\n\n"; foreach ($groups as $group => $tests) { echo $group . "\n"; - foreach ($tests as $class_name => $info) { - echo " - " . $info['name'] . ' (' . $class_name . ')' . "\n"; + foreach ($tests as $class => $info) { + echo " - " . $info['name'] . ' (' . $class . ')' . "\n"; } } exit; @@ -339,7 +342,6 @@ function simpletest_script_execute_batch() { * Run a single test (assume a Drupal bootstrapped environment). */ function simpletest_script_run_one_test($test_id, $test_class) { - simpletest_get_all_tests(); $test = new $test_class($test_id); $test->run(); $info = $test->getInfo(); -- cgit v1.2.3