示例#1
0
 public function testSettingUrlOverridesHostHeaders()
 {
     $r = new Request('GET', 'http://test.com/test');
     $r->setUrl('https://baz.com/bar');
     $this->assertEquals('baz.com', $r->getHost());
     $this->assertEquals('baz.com', $r->getHeader('Host'));
     $this->assertEquals('/bar', $r->getPath());
     $this->assertEquals('https', $r->getScheme());
 }