You are here

public function PlaceholderTextUpdateTest::testViewsPostUpdatePlaceholderText in Drupal 8

Tests that boolean filter values are updated properly.

File

core/modules/views/tests/src/Functional/Update/PlaceholderTextUpdateTest.php, line 31

Class

PlaceholderTextUpdateTest
Tests the upgrade path for placeholder text.

Namespace

Drupal\Tests\views\Functional\Update

Code

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

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

  // Check that new settings exist.
  $this
    ->assertArrayHasKey('placeholder', $data['display']['default']['display_options']['filters']['title']['expose']);
  $this
    ->assertArrayHasKey('placeholder', $data['display']['default']['display_options']['filters']['created']['expose']);
  $this
    ->assertArrayHasKey('min_placeholder', $data['display']['default']['display_options']['filters']['created']['expose']);
  $this
    ->assertArrayHasKey('max_placeholder', $data['display']['default']['display_options']['filters']['created']['expose']);
}