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