Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
95430f98
Commit
95430f98
authored
Jun 27, 2011
by
Angie Byron
Browse files
Issue
#1191040
by sun: Use proper function for ordering tests by title.
parent
a86f6793
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/simpletest/simpletest.pages.inc
View file @
95430f98
...
...
@@ -128,7 +128,7 @@ function theme_simpletest_test_table($variables) {
);
// Sorting $element by children's #title attribute instead of by class name.
uasort
(
$element
,
'
_simpletes
t_sort_by_title'
);
uasort
(
$element
,
'
elemen
t_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.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment