public function testGetPath() { $uri = new Uri(); // host-relative path $new = $uri->withPath('/foo'); $this->assertSame('/foo', $new->getPath()); // location-relative path $new = $uri->withPath('../bar/baz'); $this->assertSame('../bar/baz', $new->getPath()); }