eZ\Bundle\EzPublishCoreBundle\Tests\Converter\ContentParamConverterTest::testApplyContent PHP Method

testApplyContent() public method

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