eZ\Bundle\EzPublishCoreBundle\Tests\Converter\LocationParamConverterTest::testApplyLocation PHP Method

testApplyLocation() public method

public testApplyLocation ( )
    public function testApplyLocation()
    {
        $id = 42;
        $valueObject = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\Content\\Location');
        $this->locationServiceMock->expects($this->once())->method('loadLocation')->with($id)->will($this->returnValue($valueObject));
        $request = new Request([], [], [self::PROPERTY_NAME => $id]);
        $config = $this->createConfiguration(self::LOCATION_CLASS, 'location');
        $this->converter->apply($request, $config);
        $this->assertInstanceOf(self::LOCATION_CLASS, $request->attributes->get('location'));
    }