public function FilterCombineTest::testFilterCombineContains in Views (for Drupal 7) 8.3
File
- lib/
Drupal/ views/ Tests/ Handler/ FilterCombineTest.php, line 47 - Definition of Drupal\views\Tests\Handler\FilterCombineTest.
Class
- FilterCombineTest
- Tests the combine filter handler.
Namespace
Drupal\views\Tests\HandlerCode
public function testFilterCombineContains() {
$view = $this
->getView();
// Change the filtering.
$view->displayHandlers['default']
->overrideOption('filters', array(
'age' => array(
'id' => 'combine',
'table' => 'views',
'field' => 'combine',
'relationship' => 'none',
'operator' => 'contains',
'fields' => array(
'name',
'job',
),
'value' => 'ing',
),
));
$this
->executeView($view);
$resultset = array(
array(
'name' => 'John',
'job' => 'Singer',
),
array(
'name' => 'George',
'job' => 'Singer',
),
array(
'name' => 'Ringo',
'job' => 'Drummer',
),
array(
'name' => 'Ginger',
'job' => NULL,
),
);
$this
->assertIdenticalResultset($view, $resultset, $this->column_map);
}