function DisplayTest::testFilterGroupsOverriding

Same name in other branches
  1. 8.9.x core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testFilterGroupsOverriding()
  2. 10 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testFilterGroupsOverriding()
  3. 11.x core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testFilterGroupsOverriding()

Tests the overriding of filter_groups.

File

core/modules/views/tests/src/Functional/Plugin/DisplayTest.php, line 154

Class

DisplayTest
Tests the basic display plugin.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

public function testFilterGroupsOverriding() {
    $view = Views::getView('test_filter_groups');
    $view->initDisplay();
    // mark is as overridden, yes FALSE, means overridden.
    $view->displayHandlers
        ->get('page')
        ->setOverride('filter_groups', FALSE);
    $this->assertFalse($view->displayHandlers
        ->get('page')
        ->isDefaulted('filter_groups'), "Make sure that 'filter_groups' is marked as overridden.");
    $this->assertFalse($view->displayHandlers
        ->get('page')
        ->isDefaulted('filters'), "Make sure that 'filters'' is marked as overridden.");
}

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