function UserRememberRolesFilterSettingTest::testViewsPostUpdateBooleanFilterAcceptEmpty
Test that filter values are updated properly.
See also
views_post_update_update_remember_role_empty()
File
-
core/
modules/ views/ tests/ src/ Functional/ Update/ UserRememberRolesFilterSettingTest.php, line 32
Class
- UserRememberRolesFilterSettingTest
- Tests the upgrade path for the clean-up of empty remember_roles display settings for views filters.
Namespace
Drupal\Tests\views\Functional\UpdateCode
public function testViewsPostUpdateBooleanFilterAcceptEmpty() : void {
$view = View::load('files');
$display = $view->get('display');
$expected = [
'authenticated' => 'authenticated',
'anonymous' => '0',
'administrator' => '0',
];
$this->assertSame($expected, $display['default']['display_options']['filters']['filename']['expose']['remember_roles']);
$this->runUpdates();
$view = View::load('files');
$display = $view->get('display');
$expected = [
'authenticated' => 'authenticated',
];
$this->assertSame($expected, $display['default']['display_options']['filters']['filename']['expose']['remember_roles']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.