1 views_handler_sort_random.test protected ViewsHandlerSortRandomTest::getBasicRandomView()

Return a basic view with random ordering.

File

core/modules/views/tests/handlers/views_handler_sort_random.test, line 32
Definition of ViewsHandlerSortRandomTest.

Class

ViewsHandlerSortRandomTest
Tests for core views_handler_sort_random handler.

Code

protected function getBasicRandomView() {
  $view = $this->getBasicView();

  // Add a random ordering.
  $view->display['default']->handler->override_option('sorts', array(
    'random' => array(
      'id' => 'random',
      'field' => 'random',
      'table' => 'views',
    ),
  ));

  return $view;
}