/** * testWithHost * * @return void */ public function testWithHost() { $uri = new PsrUri('https://*****:*****@local.example.com:3001/foo?bar=baz#quz'); $new = $uri->withHost('windwalker.io'); $this->assertNotSame($uri, $new); $this->assertEquals('windwalker.io', $new->getHost()); $this->assertEquals('https://*****:*****@windwalker.io:3001/foo?bar=baz#quz', (string) $new); }