/** * @covers Core\Entity\StudentInGroups::refreshTimeStamps */ public function testRefreshTimeStamps() { $studentInGroups = new StudentInGroups($this->mockEntityManager); $studentInGroups->refreshTimeStamps(); $createdAt = $studentInGroups->getCreatedAt(); $this->assertNotNull($createdAt); $this->assertNull($studentInGroups->getUpdatedAt()); $studentInGroups->refreshTimeStamps(); $updatedAt = $studentInGroups->getUpdatedAt(); $this->assertNotNull($updatedAt); $this->assertEquals($createdAt, $studentInGroups->getCreatedAt()); }
/** * @covers Core\Entity\StudentInGroups::setUpdatedAt * @covers Core\Entity\StudentInGroups::getUpdatedAt */ public function testSetGetUpdatedAt() { $dt = new DateTime(); $this->studentInGroups->setUpdatedAt($dt); $this->assertEquals($dt, $this->studentInGroups->getUpdatedAt()); }