You are here

function FilterStringTest::testFilterStringGroupedExposedEnds in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Handler/FilterStringTest.php \Drupal\views\Tests\Handler\FilterStringTest::testFilterStringGroupedExposedEnds()

File

core/modules/views/src/Tests/Handler/FilterStringTest.php, line 486
Contains \Drupal\views\Tests\Handler\FilterStringTest.

Class

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

Namespace

Drupal\views\Tests\Handler

Code

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

  // Filter: Description, Operator: ends, Value: Beatles
  $filters['description']['group_info']['default_group'] = 4;
  $view
    ->setDisplay('page_1');
  $view->displayHandlers
    ->get('page_1')
    ->overrideOption('filters', $filters);
  $view
    ->save();
  $this->container
    ->get('router.builder')
    ->rebuild();
  $this
    ->executeView($view);
  $resultset = array(
    array(
      'name' => 'George',
    ),
    array(
      'name' => 'Ringo',
    ),
  );
  $this
    ->assertIdenticalResultset($view, $resultset, $this->columnMap);
}