function FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php \Drupal\Tests\views\Kernel\Handler\FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple()
- 10 core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php \Drupal\Tests\views\Kernel\Handler\FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple()
- 11.x core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php \Drupal\Tests\views\Kernel\Handler\FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple()
File
-
core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterInOperatorTest.php, line 111
Class
- FilterInOperatorTest
- Tests the core Drupal\views\Plugin\views\filter\InOperator handler.
Namespace
Drupal\Tests\views\Kernel\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 = [
[
'name' => 'Paul',
'age' => 26,
],
[
'name' => 'Meredith',
'age' => 30,
],
];
$this->assertCount(2, $view->result);
$this->assertIdenticalResultset($view, $expected_result, $this->columnMap);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.