|
@@ 698-706 (lines=9) @@
|
| 695 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 696 |
|
* @covers \eZ\Publish\API\Repository\RoleService::unassignRoleFromUserGroup |
| 697 |
|
*/ |
| 698 |
|
public function testUnassignRoleFromUserGroupThrowsInvalidArgumentException() |
| 699 |
|
{ |
| 700 |
|
$roleService = $this->repository->getRoleService(); |
| 701 |
|
|
| 702 |
|
$role = $roleService->loadRole(1); |
| 703 |
|
$userGroup = $this->repository->getUserService()->loadUserGroup(12); |
| 704 |
|
|
| 705 |
|
$roleService->unassignRoleFromUserGroup($role, $userGroup); |
| 706 |
|
} |
| 707 |
|
|
| 708 |
|
/** |
| 709 |
|
* Test assigning role to user. |
|
@@ 756-764 (lines=9) @@
|
| 753 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
| 754 |
|
* @covers \eZ\Publish\API\Repository\RoleService::unassignRoleFromUser |
| 755 |
|
*/ |
| 756 |
|
public function testUnassignRoleFromUserThrowsInvalidArgumentException() |
| 757 |
|
{ |
| 758 |
|
$roleService = $this->repository->getRoleService(); |
| 759 |
|
|
| 760 |
|
$role = $roleService->loadRole(2); |
| 761 |
|
$user = $this->repository->getUserService()->loadUser(14); |
| 762 |
|
|
| 763 |
|
$roleService->unassignRoleFromUser($role, $user); |
| 764 |
|
} |
| 765 |
|
|
| 766 |
|
/** |
| 767 |
|
* Test fetching all role assignments for specified role. |