1 views_handler_filter_in_operator.test | public ViewsHandlerFilterInOperator::testFilterNotInOperatorGroupedExposedSimple() |
File
- core/
modules/ views/ tests/ handlers/ views_handler_filter_in_operator.test, line 120 - Definition of ViewsHandlerFilterInOperator.
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',
));
}