Builds a url with a different fragment (the part after # in the url)
public getUrlForFragment ( $fragment ) : |
||
return |
public function testGetUrlForFragment() { // url without a fragment currently $url = new Http\Url('http://example.org/'); $this->assertEquals('http://example.org/#blarg', (string) $url->getUrlForFragment('blarg')); // url with a fragment loses current fragment $url = new Http\Url('http://example.org/#blarg'); $this->assertEquals('http://example.org/#gralb', (string) $url->getUrlForFragment('gralb')); }