/** * Sets the route host. * * @param string $host URI host */ public final function setHost($host) { Uri::validateHost($host); $this->host = Uri::standardlizeHost($host); }
public function testWithPathForSamePath() { $uri = new Uri('https://*****:*****@local.example.com:3001/foo?bar=baz#quz'); $new = $uri->withPath('/foo'); $this->assertNotSame($uri, $new); $this->assertEquals('/foo', $new->getPath()); $this->assertEquals('https://*****:*****@local.example.com:3001/foo?bar=baz#quz', (string) $new); }