Пример #1
0
 /**
  * @group ZF-6038
  */
 public function testClearRawHeader()
 {
     $this->_response->setRawHeader('HTTP/1.0 404 Not Found');
     $this->_response->setRawHeader('HTTP/1.0 401 Unauthorized');
     $originalHeadersRaw = $this->_response->getRawHeaders();
     $this->_response->clearRawHeader('HTTP/1.0 404 Not Found');
     $updatedHeadersRaw = $this->_response->getRawHeaders();
     $this->assertFalse($originalHeadersRaw == $updatedHeadersRaw);
 }
Пример #2
0
 /**
  * @group ZF-6038
  */
 public function testClearRawHeaderThatDoesNotExist()
 {
     $this->_response->setRawHeader('HTTP/1.0 404 Not Found');
     $this->_response->setRawHeader('HTTP/1.0 401 Unauthorized');
     $originalHeadersRaw = $this->_response->getRawHeaders();
     $this->_response->clearRawHeader('HTTP/1.0 403 Forbidden');
     $updatedHeadersRaw = $this->_response->getRawHeaders();
     $this->assertTrue($originalHeadersRaw == $updatedHeadersRaw);
 }