eZ\Publish\Core\Repository\Tests\Service\Integration\UserBase::testMoveUserGroup PHP Method

testMoveUserGroup() public method

Test moving a user group below another group.
public testMoveUserGroup ( )
    public function testMoveUserGroup()
    {
        $userService = $this->repository->getUserService();
        $locationService = $this->repository->getLocationService();
        $userGroupToMove = $userService->loadUserGroup(42);
        $parentUserGroup = $userService->loadUserGroup(12);
        $userService->moveUserGroup($userGroupToMove, $parentUserGroup);
        $movedUserGroup = $userService->loadUserGroup($userGroupToMove->id);
        $newMainLocation = $locationService->loadLocation($movedUserGroup->getVersionInfo()->getContentInfo()->mainLocationId);
        self::assertEquals($parentUserGroup->getVersionInfo()->getContentInfo()->mainLocationId, $newMainLocation->parentLocationId);
    }