eZ\Publish\Core\FieldType\Tests\RichText\Converter\LinkTest::testConvertLocationLink PHP Метод

    public function testConvertLocationLink($input, $output, $locationId, $urlResolved)
    {
        $inputDocument = new DOMDocument();
        $inputDocument->loadXML($input);
        $contentService = $this->getMockContentService();
        $locationService = $this->getMockLocationService();
        $urlAliasRouter = $this->getMockUrlAliasRouter();
        $location = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\Content\\Location');
        $locationService->expects($this->once())->method('loadLocation')->with($this->equalTo($locationId))->will($this->returnValue($location));
        $urlAliasRouter->expects($this->once())->method('generate')->with($this->equalTo($location))->will($this->returnValue($urlResolved));
        $converter = new Link($locationService, $contentService, $urlAliasRouter);
        $outputDocument = $converter->convert($inputDocument);
        $expectedOutputDocument = new DOMDocument();
        $expectedOutputDocument->loadXML($output);
        $this->assertEquals($expectedOutputDocument, $outputDocument);
    }