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

    public function testConvertBadContentLink($input, $output, $contentId, $exception, $logType, $logMessage)
    {
        $inputDocument = new DOMDocument();
        $inputDocument->loadXML($input);
        $contentService = $this->getMockContentService();
        $locationService = $this->getMockLocationService();
        $urlAliasRouter = $this->getMockUrlAliasRouter();
        $logger = $this->getMock('Psr\\Log\\LoggerInterface');
        $logger->expects($this->once())->method($logType)->with($this->equalTo($logMessage));
        $contentService->expects($this->once())->method('loadContentInfo')->with($this->equalTo($contentId))->will($this->throwException($exception));
        $converter = new Link($locationService, $contentService, $urlAliasRouter, $logger);
        $outputDocument = $converter->convert($inputDocument);
        $expectedOutputDocument = new DOMDocument();
        $expectedOutputDocument->loadXML($output);
        $this->assertEquals($expectedOutputDocument, $outputDocument);
    }