public function FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Handler/FilterInOperatorTest.php \Drupal\views\Tests\Handler\FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple()
File
- core/
modules/ views/ src/ Tests/ Handler/ FilterInOperatorTest.php, line 117 - Contains \Drupal\views\Tests\Handler\FilterInOperatorTest.
Class
- FilterInOperatorTest
- Tests the core Drupal\views\Plugin\views\filter\InOperator handler.
Namespace
Drupal\views\Tests\HandlerCode
public function testFilterInOperatorGroupedExposedSimple() {
$filters = $this
->getGroupedExposedFilters();
$view = Views::getView('test_view');
// Filter: Age, Operator: in, Value: 26, 30
$filters['age']['group_info']['default_group'] = 1;
$view
->setDisplay();
$view->displayHandlers
->get('default')
->overrideOption('filters', $filters);
$this
->executeView($view);
$expected_result = array(
array(
'name' => 'Paul',
'age' => 26,
),
array(
'name' => 'Meredith',
'age' => 30,
),
);
$this
->assertEqual(2, count($view->result));
$this
->assertIdenticalResultset($view, $expected_result, $this->columnMap);
}