예제 #1
0
파일: HttpTest.php 프로젝트: hjr3/zf2
 /**
  * @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
파일: HttpTest.php 프로젝트: omusico/logica
 /**
  * @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);
 }