core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php index 2089a26..704b8d8 100644 --- a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php +++ b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php @@ -109,8 +109,9 @@ public function testDependenciesRemoval() { $permission_node_type = "edit any {$node_type->id()} content"; $permission_node_type_create = "create {$node_type->id()} content"; - // Grant $role with permission to use $format and edit $node_type. + // Grant $role permission to access content, use $format, edit $node_type. $role + ->grantPermission('access content') ->grantPermission($permission_format) ->grantPermission($permission_node_type) ->grantPermission($permission_node_type_create) @@ -146,6 +147,8 @@ public function testDependenciesRemoval() { $this->assertFalse($role->hasPermission($permission_format)); $this->assertFalse($role->hasPermission($permission_node_type)); $this->assertFalse($role->hasPermission($permission_node_type_create)); + // The 'access content' permission should not have been revoked. + $this->assertTrue($role->hasPermission('access content')); } }