1.20.x views_upgrade.test public ViewsUpgradeTestCase::viewsMovedToTable()

File

modules/views/tests/views_upgrade.test, line 132
Definition of ViewsUpgradeTestCase.

Class

ViewsUpgradeTestCase
Try to test the upgrade path of all conversions.

Code

public function viewsMovedToTable() {
  $view = new view;
  $view->name = 'test_views_move_to_table';
  $view->description = '';
  $view->tag = '';
  $view->view_php = '';
  $view->base_table = 'views_old_table';
  $view->is_cacheable = FALSE;
  $view->api_version = 2;
  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

  /* Display: Master */
  $handler = $view->new_display('default', 'Master', 'default');

  $handler->display->display_options['fields']['id']['id'] = 'id';
  $handler->display->display_options['fields']['id']['table'] = 'views_old_table';
  $handler->display->display_options['fields']['id']['field'] = 'id';

  return $view;
}