function FilterStringTest::testFilterStringShorter in Views (for Drupal 7) 8.3
File
- lib/
Drupal/ views/ Tests/ Handler/ FilterStringTest.php, line 578 - Definition of Drupal\views\Tests\Handler\FilterStringTest.
Class
- FilterStringTest
- Tests the core Drupal\views\Plugin\views\filter\String handler.
Namespace
Drupal\views\Tests\HandlerCode
function testFilterStringShorter() {
$view = $this
->getView();
// Change the filtering
$view->displayHandlers['default']
->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test_data',
'field' => 'name',
'relationship' => 'none',
'operator' => 'shorterthan',
'value' => 5,
),
));
$this
->executeView($view);
$resultset = array(
array(
'name' => 'John',
),
array(
'name' => 'Paul',
),
);
$this
->assertIdenticalResultset($view, $resultset, $this->column_map);
}