Beispiel #1
0
 public function testShouldSerializeDateTimeObjectToJson()
 {
     $now = new \DateTime('now');
     $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $now->format('Y-m-d H:i:s'));
     $this->assertEquals(json_encode($now->format(\DateTime::ISO8601)), json_encode($dateTime));
 }