/** * @param View $view */ private function nullifyDates(View $view) { $headers = $view->getHeaders(); unset($headers['date']); $view->setHeaders($headers); }
public function testSetHeaders() { $view = new View(); $headers = array('foo' => 'bar'); $view->setHeaders($headers); $this->assertEquals($headers, $view->getHeaders()); }
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()); }
public function testSetHeaders() { $view = new View(); $headers = ['foo' => 'bar']; $expected = ['foo' => ['bar'], 'cache-control' => ['no-cache']]; $view->setHeaders($headers); $this->assertEquals($expected, $view->getHeaders()); }