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

testUpdateLocation() public method

Test updating location.
public testUpdateLocation ( )
    public function testUpdateLocation()
    {
        $locationService = $this->repository->getLocationService();
        $location = $locationService->loadLocation(5);
        $locationUpdateStruct = $locationService->newLocationUpdateStruct();
        $locationUpdateStruct->priority = 42;
        $locationUpdateStruct->sortField = Location::SORT_FIELD_DEPTH;
        $locationUpdateStruct->sortOrder = Location::SORT_ORDER_DESC;
        $locationUpdateStruct->remoteId = 'NEW_REMOTE_ID';
        $location = $locationService->updateLocation($location, $locationUpdateStruct);
        self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location', $location);
        $this->assertPropertiesCorrect(array('priority' => $locationUpdateStruct->priority, 'sortField' => $locationUpdateStruct->sortField, 'sortOrder' => $locationUpdateStruct->sortOrder, 'remoteId' => $locationUpdateStruct->remoteId), $location);
    }