Exemplo n.º 1
0
 public function testPrePersist()
 {
     $this->assertNull($this->entity->getCreatedAt());
     $this->assertNull($this->entity->getUpdatedAt());
     $this->entity->prePersist();
     $this->assertInstanceOf('\\DateTime', $this->entity->getCreatedAt());
     $this->assertInstanceOf('\\DateTime', $this->entity->getUpdatedAt());
     $this->assertEquals('UTC', $this->entity->getCreatedAt()->getTimezone()->getName());
     $this->assertEquals('UTC', $this->entity->getUpdatedAt()->getTimezone()->getName());
 }