Beispiel #1
0
 /**
  * @covers Core\Entity\Teacher::refreshTimeStamps
  */
 public function testRefreshTimeStamps()
 {
     $teacher = new Teacher($this->mockEntityManager);
     $teacher->refreshTimeStamps();
     $createdAt = $teacher->getCreatedAt();
     $this->assertNotNull($createdAt);
     $this->assertNull($teacher->getUpdatedAt());
     $teacher->refreshTimeStamps();
     $updatedAt = $teacher->getUpdatedAt();
     $this->assertNotNull($updatedAt);
     $this->assertEquals($createdAt, $teacher->getCreatedAt());
 }
 /**
  * {@inheritDoc}
  */
 public function getCreatedAt()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', array());
     return parent::getCreatedAt();
 }
Beispiel #3
0
 /**
  * @covers Core\Entity\Teacher::setCreatedAt
  * @covers Core\Entity\Teacher::getCreatedAt
  */
 public function testSetGetCreatedAt()
 {
     $dt = new DateTime();
     $this->teacher->setCreatedAt($dt);
     $this->assertEquals($dt, $this->teacher->getCreatedAt());
 }