function BooleanFilterValuesUpdateTest::testViewsPostUpdateBooleanFilterValues

Tests that boolean filter values are updated properly.

File

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

Class

BooleanFilterValuesUpdateTest
Tests the upgrade path for boolean field values.

Namespace

Drupal\Tests\views\Functional\Update

Code

public function testViewsPostUpdateBooleanFilterValues() {
    $this->runUpdates();
    // Load and initialize our test view.
    $view = View::load('test_boolean_filter_values');
    $data = $view->toArray();
    // Check that the field is using the expected string value.
    $this->assertIdentical('1', $data['display']['default']['display_options']['filters']['status']['value']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.