Skip to content

Commit

Permalink
fix errors from phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
reithor committed Jun 29, 2024
1 parent 4ffa1ca commit 840300a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ public function testUpdateContentHavingPrivateRelation(): void

// 5. Create User that has no access to content in $privateSection
$editorRole = $repository->getRoleService()->loadRole(3);
// remove existing role assignments
foreach ($repository->getRoleService()->getRoleAssignments($editorRole) as $role) {
if ($role->getRoleLimitation()->limitationValues == ['/1/2/']) {
$repository->getRoleService()->removeRoleAssignment($role);
}
$repository->getRoleService()->removeRoleAssignment($role);
}

$editorUserGroup = $userService->loadUserGroup(13);
// grant access to standard section
$repository->getRoleService()->assignRoleToUserGroup(
$editorRole,
$editorUserGroup,
Expand All @@ -93,6 +94,6 @@ public function testUpdateContentHavingPrivateRelation(): void
// 7. Read relations & check if count($relations) is unchanged
$permissionResolver->setCurrentUserReference($userService->loadUser($administratorUserId));
$relations = $contentService->loadRelations($folder->getVersionInfo());
self::assertEquals(1, count($relations));
self::assertEquals(1, count((array)$relations));
}
}

0 comments on commit 840300a

Please sign in to comment.