setDate() 공개 메소드

The given date must either be an RFC2822 parseable date string or a DateTime object. The timezone will be converted to GMT internally, but the point in time remains the same.
public setDate ( string | DateTime $date ) : Response
$date string | DateTime
리턴 Response This response, for method chaining
 /**
  * @test
  */
 public function setDateAndGetDateSetAndGetTheDateHeader()
 {
     $now = \DateTime::createFromFormat(DATE_RFC2822, 'Tue, 22 May 2012 12:00:00 GMT');
     $response = new Response();
     $response->setDate($now);
     $this->assertEquals($now, $response->getDate());
     $response->setDate('Tue, 22 May 2012 12:00:00 GMT');
     $this->assertEquals($now, $response->getDate());
 }