eZ\Publish\Core\Repository\Tests\Service\Integration\LocationBase::testLoadLocationChildren PHP Method

testLoadLocationChildren() public method

Test loading location children.
    public function testLoadLocationChildren()
    {
        $locationService = $this->repository->getLocationService();
        $rootLocation = $locationService->loadLocation(5);
        $childrenLocations = $locationService->loadLocationChildren($rootLocation);
        self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\LocationList', $childrenLocations);
        self::assertInternalType('array', $childrenLocations->locations);
        self::assertInternalType('int', $childrenLocations->totalCount);
        self::assertNotEmpty($childrenLocations->locations);
        foreach ($childrenLocations->locations as $childLocation) {
            self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location', $childLocation);
            self::assertEquals($rootLocation->id, $childLocation->parentLocationId);
        }
    }