示例#1
0
 public function testPrePersist()
 {
     $this->assertNull($this->comment->getCreatedAt());
     $this->comment->prePersist();
     $this->assertInstanceOf('DateTime', $this->comment->getCreatedAt());
     $this->assertLessThan(3, $this->comment->getCreatedAt()->diff(new \DateTime())->s);
 }