eZ\Publish\Core\Repository\Tests\Service\Integration\RoleBase::testUnassignRoleFromUserGroupUnauthorizedException PHP Метод

testUnassignRoleFromUserGroupUnauthorizedException() публичный Метод

But on current admin user so he lacks access to read roles.
    public function testUnassignRoleFromUserGroupUnauthorizedException()
    {
        $roleService = $this->repository->getRoleService();
        try {
            $adminRole = $roleService->loadRole(2);
            $adminUserGroup = $this->repository->getUserService()->loadUserGroup(12);
            $roleService->getRoleAssignmentsForUserGroup($adminUserGroup);
            $roleService->unassignRoleFromUserGroup($adminRole, $adminUserGroup);
        } catch (Exception $e) {
            self::fail('Unexpected exception: ' . $e->getMessage() . " \n[" . $e->getFile() . ' (' . $e->getLine() . ')]');
        }
        $roleService->getRoleAssignmentsForUserGroup($adminUserGroup);
    }