| @@ 493-507 (lines=15) @@ | ||
| 490 | * |
|
| 491 | * @covers \eZ\Publish\API\Repository\RoleService::loadRole |
|
| 492 | */ |
|
| 493 | public function testLoadRole() |
|
| 494 | { |
|
| 495 | $roleService = $this->repository->getRoleService(); |
|
| 496 | ||
| 497 | $role = $roleService->loadRole(1); |
|
| 498 | self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\Role', $role); |
|
| 499 | ||
| 500 | $this->assertPropertiesCorrect( |
|
| 501 | [ |
|
| 502 | 'id' => 1, |
|
| 503 | 'identifier' => 'Anonymous', |
|
| 504 | ], |
|
| 505 | $role |
|
| 506 | ); |
|
| 507 | } |
|
| 508 | ||
| 509 | /** |
|
| 510 | * Test loading role by id throwing NotFoundException. |
|
| @@ 527-541 (lines=15) @@ | ||
| 524 | * |
|
| 525 | * @covers \eZ\Publish\API\Repository\RoleService::loadRoleByIdentifier |
|
| 526 | */ |
|
| 527 | public function testLoadRoleByIdentifier() |
|
| 528 | { |
|
| 529 | $roleService = $this->repository->getRoleService(); |
|
| 530 | ||
| 531 | $role = $roleService->loadRoleByIdentifier('Anonymous'); |
|
| 532 | self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\Role', $role); |
|
| 533 | ||
| 534 | $this->assertPropertiesCorrect( |
|
| 535 | [ |
|
| 536 | 'id' => 1, |
|
| 537 | 'identifier' => 'Anonymous', |
|
| 538 | ], |
|
| 539 | $role |
|
| 540 | ); |
|
| 541 | } |
|
| 542 | ||
| 543 | /** |
|
| 544 | * Test loading role by identifier throwing NotFoundException. |
|