Commit 95430f98 authored by webchick's avatar webchick

Issue #1191040 by sun: Use proper function for ordering tests by title.

parent a86f6793
......@@ -128,7 +128,7 @@ function theme_simpletest_test_table($variables) {
);
// Sorting $element by children's #title attribute instead of by class name.
uasort($element, '_simpletest_sort_by_title');
uasort($element, 'element_sort_by_title');
// Cycle through each test within the current group.
foreach (element_children($element) as $test_name) {
......@@ -177,18 +177,6 @@ function theme_simpletest_test_table($variables) {
}
}
/**
* Sort element by title instead of by class name.
*/
function _simpletest_sort_by_title($a, $b) {
// This is for parts of $element that are not an array.
if (!isset($a['#title']) || !isset($b['#title'])) {
return 1;
}
return strcasecmp($a['#title'], $b['#title']);
}
/**
* Run selected tests.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment