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)); }
public function testIsRedirectWhenRawLocationHeaderSet() { $this->_response->setRawHeader('Location: http://framework.zend.com/'); $this->assertTrue($this->_response->isRedirect()); }