| @@ 108-130 (lines=23) @@ | ||
| 105 | * @covers \eZ\Publish\API\Repository\UserService::loadSubUserGroups |
|
| 106 | * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
|
| 107 | */ |
|
| 108 | public function testLoadSubUserGroupsThrowsNotFoundException() |
|
| 109 | { |
|
| 110 | $repository = $this->getRepository(); |
|
| 111 | $userService = $repository->getUserService(); |
|
| 112 | ||
| 113 | $parentGroup = new UserGroup( |
|
| 114 | [ |
|
| 115 | 'content' => new Content( |
|
| 116 | [ |
|
| 117 | 'versionInfo' => new VersionInfo( |
|
| 118 | [ |
|
| 119 | 'contentInfo' => new ContentInfo( |
|
| 120 | ['id' => 123456] |
|
| 121 | ), |
|
| 122 | ] |
|
| 123 | ), |
|
| 124 | 'internalFields' => [], |
|
| 125 | ] |
|
| 126 | ), |
|
| 127 | ] |
|
| 128 | ); |
|
| 129 | $userService->loadSubUserGroups($parentGroup); |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Test for the newUserGroupCreateStruct() method. |
|
| @@ 447-465 (lines=19) @@ | ||
| 444 | * @covers \eZ\Publish\API\Repository\UserService::deleteUserGroup |
|
| 445 | * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
|
| 446 | */ |
|
| 447 | public function testDeleteUserGroupThrowsNotFoundException() |
|
| 448 | { |
|
| 449 | $repository = $this->getRepository(); |
|
| 450 | $userService = $repository->getUserService(); |
|
| 451 | ||
| 452 | $userGroup = new UserGroup( |
|
| 453 | [ |
|
| 454 | 'content' => new Content( |
|
| 455 | [ |
|
| 456 | 'versionInfo' => new VersionInfo( |
|
| 457 | ['contentInfo' => new ContentInfo(['id' => 123456])] |
|
| 458 | ), |
|
| 459 | 'internalFields' => [], |
|
| 460 | ] |
|
| 461 | ), |
|
| 462 | ] |
|
| 463 | ); |
|
| 464 | $userService->deleteUserGroup($userGroup); |
|
| 465 | } |
|
| 466 | ||
| 467 | /** |
|
| 468 | * Test for the moveUserGroup() method. |
|