public function testStripsQueryPrefixIfPresent() { $uri = new Uri('http://example.com'); $new = $uri->withQuery('?foo=bar'); $this->assertEquals('foo=bar', $new->getQuery()); }
/** * @group 48 */ public function testWithQueryReturnsSameInstanceWhenQueryDoesNotChange() { $uri = new Uri('http://example.com/test/path?foo=bar'); $test = $uri->withQuery('foo=bar'); $this->assertSame($uri, $test); }