eZ\Publish\Core\Repository\Tests\Service\Mock\RelationProcessorTest::assertLocationHandlerExpectation PHP Method

assertLocationHandlerExpectation() protected method

Assert loading Locations to find Content id in {@link RelationProcessor::appendFieldRelations()} method.
protected assertLocationHandlerExpectation ( $locationHandlerMock, $fieldRelations, $type, &$callCounter )
    protected function assertLocationHandlerExpectation($locationHandlerMock, $fieldRelations, $type, &$callCounter)
    {
        if (isset($fieldRelations[$type]['locationIds'])) {
            foreach ($fieldRelations[$type]['locationIds'] as $locationId) {
                $locationHandlerMock->expects($this->at($callCounter))->method('load')->with($this->equalTo($locationId))->will($this->returnValue(new Location(array('contentId' => $locationId + 100))));
                $callCounter += 1;
            }
        }
    }