protected function ViewsTestCase::orderResultSet in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 tests/views_query.test \ViewsTestCase::orderResultSet()
Order an array of array based on a column.
2 calls to ViewsTestCase::orderResultSet()
- ViewsHandlerSortTest::testNumericOrdering in tests/
handlers/ views_handler_sort.test - Tests numeric ordering of the result set.
- ViewsHandlerSortTest::testStringOrdering in tests/
handlers/ views_handler_sort.test - Tests string ordering of the result set.
File
- tests/
views_query.test, line 99 - Abstract class for views testing.
Class
Code
protected function orderResultSet($result_set, $column, $reverse = FALSE) {
$this->sort_column = $column;
$this->sort_order = $reverse ? -1 : 1;
usort($result_set, array(
$this,
'helperCompareFunction',
));
return $result_set;
}