eZ\Publish\Core\REST\Server\Tests\Input\Parser\LocationCreateTest::getLocationServiceMock PHP Method

getLocationServiceMock() protected method

Get the location service mock object.
protected getLocationServiceMock ( ) : eZ\Publish\API\Repository\LocationService
return eZ\Publish\API\Repository\LocationService
    protected function getLocationServiceMock()
    {
        $locationServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\LocationService', array(), array(), '', false);
        $locationServiceMock->expects($this->any())->method('newLocationCreateStruct')->with($this->equalTo(42))->will($this->returnValue(new LocationCreateStruct(array('parentLocationId' => 42))));
        return $locationServiceMock;
    }