function FilterStringTest::testFilterStringContains
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::testFilterStringContains()
- 8.9.x core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::testFilterStringContains()
- 11.x core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::testFilterStringContains()
File
-
core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterStringTest.php, line 201
Class
- FilterStringTest
- Tests the core Drupal\views\Plugin\views\filter\StringFilter handler.
Namespace
Drupal\Tests\views\Kernel\HandlerCode
public function testFilterStringContains() : void {
$view = Views::getView('test_view');
$view->setDisplay();
// Change the filtering
$view->displayHandlers
->get('default')
->overrideOption('filters', [
'name' => [
'id' => 'name',
'table' => 'views_test_data',
'field' => 'name',
'relationship' => 'none',
'operator' => 'contains',
'value' => 'iNg',
],
]);
$this->executeView($view);
$resultset = [
[
'name' => 'Ringo',
],
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.