diff -u b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php --- b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php +++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php @@ -64,2 +64,17 @@ + $view = View::load('test_user_name'); + $display = &$view->getDisplay('default'); + $display['display_options']['filters']['roles_target_id'] = [ + 'id' => 'roles_target_id', + 'table' => 'user__roles', + 'field' => 'roles_target_id', + 'value' => [ + 'test_user_role' => 'test_user_role', + ], + 'operator' => 'not empty', + 'plugin_id' => 'user_roles', + ]; + $view->save(); + $this->assertEqual($expected, $view->getDependencies()); + $view = Views::getView('test_user_name'); @@ -77,7 +92,6 @@ 'plugin_id' => 'user_roles', ]; $view->save(); - unset($expected['config']); $this->assertEqual($expected, $view->getDependencies()); }