public function FilterNumericTest::testFilterNumericExposedGroupedNotEmpty in Views (for Drupal 7) 8.3
File
- lib/
Drupal/ views/ Tests/ Handler/ FilterNumericTest.php, line 293 - Definition of Drupal\views\Tests\Handler\FilterNumericTest.
Class
- FilterNumericTest
- Tests the numeric filter handler.
Namespace
Drupal\views\Tests\HandlerCode
public function testFilterNumericExposedGroupedNotEmpty() {
$filters = $this
->getGroupedExposedFilters();
$view = $this
->getBasicPageView();
// Filter: Age, Operator: empty, Value:
$filters['age']['group_info']['default_group'] = 5;
$view
->setDisplay('page_1');
$view->displayHandlers['page_1']
->overrideOption('filters', $filters);
$this
->executeView($view);
$resultset = array(
array(
'name' => 'John',
'age' => 25,
),
array(
'name' => 'George',
'age' => 27,
),
array(
'name' => 'Ringo',
'age' => 28,
),
array(
'name' => 'Paul',
'age' => 26,
),
array(
'name' => 'Meredith',
'age' => 30,
),
);
$this
->assertIdenticalResultset($view, $resultset, $this->column_map);
}