function ViewsHandlerFilterInOperator::testFilterNotInOperatorGroupedExposedSimple

File

tests/handlers/views_handler_filter_in_operator.test, line 143

Class

ViewsHandlerFilterInOperator
Tests the core views_handler_filter_in_operator handler.

Code

public function testFilterNotInOperatorGroupedExposedSimple() {
  $filters = $this->getGroupedExposedFilters();
  $view = $this->getBasicPageView();
  // Filter: Age, Operator: in, Value: 26, 30.
  $filters['age']['group_info']['default_group'] = 2;
  $view->set_display('page_1');
  $view->display['page_1']->handler
    ->override_option('filters', $filters);
  $this->executeView($view);
  $expected_result = array(
    array(
      'name' => 'John',
      'age' => 25,
    ),
    array(
      'name' => 'George',
      'age' => 27,
    ),
    array(
      'name' => 'Ringo',
      'age' => 28,
    ),
  );
  $this->assertEqual(3, count($view->result));
  $this->assertIdenticalResultset($view, $expected_result, array(
    'views_test_name' => 'name',
    'views_test_age' => 'age',
  ));
}