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