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