示例#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());
 }