eZ\Publish\Core\Repository\Tests\Service\Integration\UserBase::testLoadUsersOfUserGroup PHP Метод

testLoadUsersOfUserGroup() публичный Метод

Test loading user groups the user belongs to.
    public function testLoadUsersOfUserGroup()
    {
        $userService = $this->repository->getUserService();
        $locationService = $this->repository->getLocationService();
        $userGroup = $userService->loadUserGroup(12);
        $users = $userService->loadUsersOfUserGroup($userGroup);
        self::assertInternalType('array', $users);
        self::assertNotEmpty($users);
        foreach ($users as $user) {
            self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\User', $user);
            $userLocation = $locationService->loadLocation($user->getVersionInfo()->getContentInfo()->mainLocationId);
            self::assertEquals($userGroup->getVersionInfo()->getContentInfo()->mainLocationId, $userLocation->parentLocationId);
        }
    }