Exemple #1
0
 public function testDateFromStringCreatesValidDateTime()
 {
     $dateHeader = Date::fromString('Date: Sun, 06 Nov 1994 08:49:37 GMT');
     $this->assertInstanceOf('\\DateTime', $dateHeader->date());
     $this->assertEquals('Sun, 06 Nov 1994 08:49:37 GMT', $dateHeader->date()->format('D, d M Y H:i:s \\G\\M\\T'));
 }
Exemple #2
0
 public function testDateFromStringCreatesValidDateHeader()
 {
     $dateHeader = Date::fromString('Date: xxx');
     $this->assertInstanceOf('Zend\\Http\\Header\\HeaderDescription', $dateHeader);
     $this->assertInstanceOf('Zend\\Http\\Header\\Date', $dateHeader);
 }