getUrlForPath() public method

Builds a URL with a different path component
public getUrlForPath ( $path ) : Url
return Url
Example #1
0
 public function testGettingUrlForPathTrimsQueryString()
 {
     $url = new Http\Url('http://example.org/my/path?test=1');
     $relative = $url->getUrlForPath('/test/path');
     $this->assertEquals($relative->__toString(), 'http://example.org/test/path');
 }