Example #1
0
 public function testOutputHeader()
 {
     $response = new Sabel_Response_Object();
     $response->setHeader("Content-Type", "text/html; charset=UTF-8");
     $response->setHeader("Content-Length", "4096");
     $headers = $response->outputHeader();
     $this->assertEquals("Content-Type: text/html; charset=UTF-8", $headers[1]);
     $this->assertEquals("Content-Length: 4096", $headers[2]);
 }
Example #2
0
 public function testResponseHeader()
 {
     $response = new Sabel_Response_Object();
     $response->setHeader("Content-Type", "image/gif");
     $response->setHeader("Content-Length", "4096");
     $this->assertEquals("image/gif", $response->getHeader("Content-Type"));
     $this->assertEquals("4096", $response->getHeader("Content-Length"));
     $this->assertEquals(array("Content-Type" => "image/gif", "Content-Length" => "4096"), $response->getHeaders());
     $this->assertEquals(null, $response->getHeader("Foo-Bar"));
 }