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