diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
index 306e813..fb35afd 100644
--- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
+++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php
@@ -39,13 +39,27 @@ public function testDependencies() {
       'id' => 'roles_target_id',
       'table' => 'user__roles',
       'field' => 'roles_target_id',
+      'value' => ['test_user_role' => 'test_user_role'],
+      'plugin_id' => 'user_roles',
+    ];
+    $view->save();
+    $expected['config'][] = 'user.role.test_user_role';
+    $this->assertEqual($expected, $view->getDependencies());
+
+    $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' => 'empty',
       'plugin_id' => 'user_roles',
     ];
     $view->save();
-    $expected['config'][] = 'user.role.test_user_role';
+    unset($expected['config']);
     $this->assertEqual($expected, $view->getDependencies());
 
     $view = Views::getView('test_user_name');
