You are here

public function DisplayTest::testFilterGroupsOverriding in Views (for Drupal 7) 8.3

Tests the overriding of filter_groups.

File

lib/Drupal/views/Tests/Plugin/DisplayTest.php, line 112
Definition of Drupal\views\Tests\Plugin\DisplayTest.

Class

DisplayTest
Tests the basic display plugin.

Namespace

Drupal\views\Tests\Plugin

Code

public function testFilterGroupsOverriding() {
  $view = $this
    ->createViewFromConfig('test_filter_groups');
  $view
    ->initDisplay();

  // mark is as overridden, yes FALSE, means overridden.
  $view->displayHandlers['page']
    ->setOverride('filter_groups', FALSE);
  $this
    ->assertFalse($view->displayHandlers['page']
    ->isDefaulted('filter_groups'), "Take sure that 'filter_groups' is marked as overridden.");
  $this
    ->assertFalse($view->displayHandlers['page']
    ->isDefaulted('filters'), "Take sure that 'filters'' is marked as overridden.");
}