예제 #1
0
 public function testBeforeSave()
 {
     $this->item->beforeSave();
     $date = new \DateTime('now', new \DateTimeZone('UTC'));
     $createdAt = $this->item->getCreatedAt();
     $this->assertEquals($date->format('Y-m-d'), $createdAt->format('Y-m-d'));
     $updatedAt = $this->item->getUpdatedAt();
     $this->assertEquals($date->format('Y-m-d'), $updatedAt->format('Y-m-d'));
 }