getExpires() public method

Returns the value of the Expires header as a DateTime instance
public getExpires ( ) : string
return string A string or null if the header does not exist
Example #1
0
 /**
  * Test Expires
  */
 public function testExpiresAsDate()
 {
     $date = new \DateTime('2012-12-12T12:12:12+00:00');
     $this->cacheControl->setExpires($date);
     $this->assertEquals('Wed, 12 Dec 2012 12:12:12 GMT', $this->cacheControl->getExpires());
     $this->assertEquals('Wed, 12 Dec 2012 12:12:12 GMT', $this->response->getHeader('Expires'));
 }