public function testSetHostSetsValue() { $url = 'http://example.com/path'; $uri = new URI($url); $expected = 'http://another.com/path'; $uri->setHost('another.com'); $this->assertEquals('another.com', $uri->getHost()); $this->assertEquals($expected, (string) $uri); }