You are here

public function FilterStringTest::testFilterStringGroupedExposedNot in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::testFilterStringGroupedExposedNot()
  2. 10 core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::testFilterStringGroupedExposedNot()

File

core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php, line 610

Class

FilterStringTest
Tests the core Drupal\views\Plugin\views\filter\StringFilter handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

public function testFilterStringGroupedExposedNot() {
  $filters = $this
    ->getGroupedExposedFilters();
  $view = $this
    ->getBasicPageView();

  // Filter: Description, Operator: not (does not contains), Value: Beatles
  $filters['description']['group_info']['default_group'] = 6;
  $view
    ->setDisplay('page_1');
  $view->displayHandlers
    ->get('page_1')
    ->overrideOption('filters', $filters);
  $view
    ->save();
  $this
    ->executeView($view);
  $resultset = [
    [
      'name' => 'John',
    ],
    [
      'name' => 'Paul',
    ],
  ];
  $this
    ->assertIdenticalResultset($view, $resultset, $this->columnMap);
}