예제 #1
0
 /**
  * @param View $view
  */
 private function nullifyDates(View $view)
 {
     $headers = $view->getHeaders();
     unset($headers['date']);
     $view->setHeaders($headers);
 }
예제 #2
0
파일: ViewTest.php 프로젝트: hykz/Depot
 public function testSetHeaders()
 {
     $view = new View();
     $headers = array('foo' => 'bar');
     $view->setHeaders($headers);
     $this->assertEquals($headers, $view->getHeaders());
 }
예제 #3
0
 public function testSetHeaders()
 {
     $view = new View();
     $headers = array('foo' => 'bar');
     $expected = array('foo' => array('bar'), 'cache-control' => array('no-cache'));
     $view->setHeaders($headers);
     $this->assertEquals($expected, $view->getHeaders());
 }
예제 #4
0
 public function testSetHeaders()
 {
     $view = new View();
     $headers = ['foo' => 'bar'];
     $expected = ['foo' => ['bar'], 'cache-control' => ['no-cache']];
     $view->setHeaders($headers);
     $this->assertEquals($expected, $view->getHeaders());
 }