1 views_upgrade.test public ViewsUpgradeTestCase::viewsMovedToField()

File

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

Class

ViewsUpgradeTestCase
Try to test the upgrade path of all conversions.

Code

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

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

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

  return $view;
}