Exemplo n.º 1
0
 public function testCanChangePort()
 {
     $r = new Request('GET', 'http://www.foo.com:222');
     $this->assertSame(222, $r->getPort());
     $this->assertEquals('www.foo.com', $r->getHost());
     $this->assertEquals('www.foo.com:222', $r->getHeader('host'));
     $r->setPort(80);
     $this->assertSame(80, $r->getPort());
     $this->assertEquals('www.foo.com', $r->getHost());
     $this->assertEquals('www.foo.com', $r->getHeader('host'));
 }