getUpdated() public method

Get updated datetime
public getUpdated ( ) : DateTime
return DateTime
Exemplo n.º 1
0
 public function testDeleteActive()
 {
     $this->user->setActive(true);
     $this->em->persist($this->user);
     $this->em->flush();
     $this->user->addAttribute('tic', 'toc');
     $this->em->persist($this->user);
     $this->em->flush();
     $this->assertTrue($this->user->isActive());
     $this->auth->expects($this->once())->method('getIdentity')->will($this->returnValue(3));
     sleep(2);
     // for testing difference in create/update time
     $this->service->delete($this->user);
     $this->assertFalse($this->user->isActive());
     $this->assertFalse($this->user->isPublic());
     $this->assertFalse($this->user->isAdmin());
     $this->assertEmpty($this->user->getEmail());
     $this->assertEmpty($this->user->getFirstName());
     $this->assertEmpty($this->user->getLastName());
     $this->assertEmpty($this->user->getAttribute('tic'));
     $this->assertEmpty($this->user->getAttributes());
     $this->assertGreaterThan($this->user->getCreated()->getTimestamp(), $this->user->getUpdated()->getTimestamp());
 }
Exemplo n.º 2
0
 public function getUpdated()
 {
     $this->__load();
     return parent::getUpdated();
 }