public function FilterNumericTest::testFilterNumericExposedGroupedNotBetween

File

drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FilterNumericTest.php, line 199
Definition of Drupal\views\Tests\Handler\FilterNumericTest.

Class

FilterNumericTest
Tests the numeric filter handler.

Namespace

Drupal\views\Tests\Handler

Code

public function testFilterNumericExposedGroupedNotBetween() {
  $filters = $this
    ->getGroupedExposedFilters();
  $view = views_get_view('test_view');
  $view->storage
    ->newDisplay('page', 'Page', 'page_1');

  // Filter: Age, Operator: between, Value: 26 and 29
  $filters['age']['group_info']['default_group'] = 3;
  $view
    ->setDisplay('page_1');
  $view->displayHandlers['page_1']
    ->overrideOption('filters', $filters);
  $this
    ->executeView($view);
  $resultset = array(
    array(
      'name' => 'John',
      'age' => 25,
    ),
    array(
      'name' => 'Paul',
      'age' => 26,
    ),
    array(
      'name' => 'Meredith',
      'age' => 30,
    ),
  );
  $this
    ->assertIdenticalResultset($view, $resultset, $this->column_map);
}