예제 #1
0
 public function testClearAllHeaders()
 {
     $this->_response->setRawHeader('HTTP/1.0 404 Not Found');
     $this->_response->setHeader('Content-Type', 'text/xml');
     $headers = $this->_response->getHeaders();
     $this->assertFalse(empty($headers));
     $headers = $this->_response->getRawHeaders();
     $this->assertFalse(empty($headers));
     $this->_response->clearAllHeaders();
     $headers = $this->_response->getHeaders();
     $this->assertTrue(empty($headers));
     $headers = $this->_response->getRawHeaders();
     $this->assertTrue(empty($headers));
 }
예제 #2
0
파일: HttpTest.php 프로젝트: lortnus/zf1
 public function testIsRedirectWhenRawLocationHeaderSet()
 {
     $this->_response->setRawHeader('Location: http://framework.zend.com/');
     $this->assertTrue($this->_response->isRedirect());
 }