Example #1
0
 /**
  * Sets the route host.
  *
  * @param string $host URI host
  */
 public final function setHost($host)
 {
     Uri::validateHost($host);
     $this->host = Uri::standardlizeHost($host);
 }
Example #2
0
 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);
 }