public function testPreUpdate() { $this->assertNull($this->entity->getUpdatedAt()); $this->entity->preUpdate(); $this->assertInstanceOf('DateTime', $this->entity->getUpdatedAt()); $this->assertLessThan(3, $this->entity->getUpdatedAt()->diff(new \DateTime())->s); }