Ejemplo n.º 1
0
 public function testSetHeaders()
 {
     $h = new HttpRequest("http://www.example.com/request", "POST");
     $h->setHeader("A", "B");
     $h->setHeader("foo", "bar");
     $this->assertEquals("B", $h->getHeader("A"));
     $this->assertEquals("bar", $h->getHeader("foo"));
     $this->assertEquals(array("A" => "B", "FOO" => "bar"), $h->getHeaders(FALSE));
     $this->assertEquals(array("A: B", "FOO: bar"), $h->getHeaders(TRUE));
 }