function FilterNumericTest::testFilterNumericExposedGroupedBetween
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::testFilterNumericExposedGroupedBetween()
- 10 core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::testFilterNumericExposedGroupedBetween()
- 11.x core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::testFilterNumericExposedGroupedBetween()
File
-
core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php, line 193
Class
- FilterNumericTest
- Tests the numeric filter handler.
Namespace
Drupal\Tests\views\Kernel\HandlerCode
public function testFilterNumericExposedGroupedBetween() {
$filters = $this->getGroupedExposedFilters();
$view = Views::getView('test_view');
$view->newDisplay('page', 'Page', 'page_1');
// Filter: Age, Operator: between, Value: 26 and 29
$filters['age']['group_info']['default_group'] = 2;
$view->setDisplay('page_1');
$view->displayHandlers
->get('page_1')
->overrideOption('filters', $filters);
$view->save();
$this->container
->get('router.builder')
->rebuild();
$this->executeView($view);
$resultset = [
[
'name' => 'George',
'age' => 27,
],
[
'name' => 'Ringo',
'age' => 28,
],
[
'name' => 'Paul',
'age' => 26,
],
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.