You are here

public function FieldHandlersUpdateTest::testViewsUpdate8004 in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Update/FieldHandlersUpdateTest.php \Drupal\views\Tests\Update\FieldHandlersUpdateTest::testViewsUpdate8004()

Tests that field handlers are updated properly.

File

core/modules/views/src/Tests/Update/FieldHandlersUpdateTest.php, line 35
Contains \Drupal\views\Tests\Update\FieldHandlersUpdateTest.

Class

FieldHandlersUpdateTest
Tests the upgrade path for views field handlers.

Namespace

Drupal\views\Tests\Update

Code

public function testViewsUpdate8004() {
  $this
    ->runUpdates();

  // Load and initialize our test view.
  $view = View::load('test_duplicate_field_handlers');
  $data = $view
    ->toArray();

  // Check that the field is using the expected base table.
  $this
    ->assertEqual('node_field_data', $data['display']['default']['display_options']['fields']['nid']['table']);
  $this
    ->assertEqual('node_field_data', $data['display']['default']['display_options']['filters']['type']['table']);
  $this
    ->assertEqual('node_field_data', $data['display']['default']['display_options']['sorts']['vid']['table']);
  $this
    ->assertEqual('node_field_data', $data['display']['default']['display_options']['arguments']['nid']['table']);
}