eZ\Publish\Core\MVC\Symfony\Routing\Tests\UrlAliasGeneratorTest::testGetPathPrefixByRootLocationId PHP Метод

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

    public function testGetPathPrefixByRootLocationId()
    {
        $rootLocationId = 123;
        $rootLocation = new Location(array('id' => $rootLocationId));
        $pathPrefix = '/foo/bar';
        $rootUrlAlias = new URLAlias(array('path' => $pathPrefix));
        $this->locationService->expects($this->once())->method('loadLocation')->with($rootLocationId)->will($this->returnValue($rootLocation));
        $this->urlAliasService->expects($this->once())->method('reverseLookup')->with($rootLocation)->will($this->returnValue($rootUrlAlias));
        $this->assertSame($pathPrefix, $this->urlAliasGenerator->getPathPrefixByRootLocationId($rootLocationId));
    }