public getUrlForRelativePath ( $path ) : |
||
return |
public function getUrlForRelativePath($path)
{
return $this->getUrlForPath($this->_joinPathComponents($this->getPath(), ltrim($path, '/')));
}
public function testGetForRelativePathWithOnlySlash() { $url = new Http\Url('http://example.org/test'); $relative = $url->getUrlForRelativePath('/'); $this->assertEquals($relative->__toString(), 'http://example.org/test'); }