protected function ViewsHandlerSortRandomTest::dataSet
3.x views_handler_sort_random.test | protected ViewsHandlerSortRandomTest::dataSet() |
Add more items to the test set, to make the order tests more robust.
Overrides ViewsSqlTest::dataSet
1 call to ViewsHandlerSortRandomTest::dataSet()
- ViewsHandlerSortRandomTest::testRandomOrdering in tests/
handlers/ views_handler_sort_random.test - Tests random ordering of the result set.
File
- tests/
handlers/ views_handler_sort_random.test, line 23 - Definition of ViewsHandlerSortRandomTest.
Class
- ViewsHandlerSortRandomTest
- Tests for core views_handler_sort_random handler.
Code
protected function dataSet() {
$data = parent::dataSet();
for ($i = 0; $i < 50; $i++) {
$data[] = array(
'name' => 'name_' . $i,
'age' => $i,
'job' => 'job_' . $i,
'created' => rand(0, time()),
);
}
return $data;
}