You are here

function _simpletest_sort_by_title in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 simpletest.pages.inc \_simpletest_sort_by_title()
  2. 7.2 simpletest.pages.inc \_simpletest_sort_by_title()

Sort element by title instead of by class name.

1 string reference to '_simpletest_sort_by_title'
theme_simpletest_test_table in ./simpletest.pages.inc
Theme the test list generated by simpletest_test_form() into a table.

File

./simpletest.pages.inc, line 171
Page callbacks for simpletest module.

Code

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']);
}