public function testCanChangeHost() { $r = new puzzle_message_Request('GET', 'http://www.foo.com:222'); $r->setHost('goo'); $this->assertEquals('http://goo:222', $r->getUrl()); $this->assertEquals('goo:222', $r->getHeader('host')); $r->setHost('goo:80'); $this->assertEquals('http://goo', $r->getUrl()); $this->assertEquals('goo', $r->getHeader('host')); }