public function testBeforeUpdate() { $obj = new Letter(); $this->assertNull($obj->getCreatedAt()); $this->assertNull($obj->getUpdatedAt()); $obj->preUpdate(); $this->assertInstanceOf('\\DateTime', $obj->getUpdatedAt()); $this->assertNull($obj->getCreatedAt()); }