setHost() public méthode

Sets the host(s) of the URI
public setHost ( string $host ) : void
$host string The hostname(s)
Résultat void
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function settingInvalidHostThrowsException()
 {
     $uri = new Uri('');
     $uri->setHost('an#invalid.host');
 }