eZ\Publish\Core\Repository\Tests\Service\Integration\UrlWildcardTest::testTranslate PHP Метод

testTranslate() публичный Метод

Test for the translate() method.
public testTranslate ( $createArray, $url, $uri )
    public function testTranslate($createArray, $url, $uri)
    {
        $mockedService = $this->getPartlyMockedURLWildcardService();
        /** @var \PHPUnit_Framework_MockObject_MockObject $handlerMock */
        $handlerMock = $this->getPersistenceMock()->urlWildcardHandler();
        $handlerMock->expects($this->once())->method('loadAll')->with($this->equalTo(0), $this->equalTo(-1))->will($this->returnValue(array(new SPIURLWildcard($createArray))));
        $translationResult = $mockedService->translate($url);
        $this->assertEquals(new URLWildcardTranslationResult(array('uri' => $uri, 'forward' => $createArray['forward'])), $translationResult);
    }