Exemple #1
0
 /**
  * Tests Site->setUpdatedValue().
  */
 public function testSetUpdatedValue()
 {
     $this->assertNull($this->site->getUpdated());
     $this->site->setUpdatedValue();
     $this->assertNotNull($this->site->getUpdated());
     $this->assertTrue($this->site->getUpdated() instanceof \DateTime);
     $date = new \DateTime();
     $date->sub(new \DateInterval('P5Y'));
     $this->site->setUpdated($date);
     $this->assertEquals($date, $this->site->getUpdated());
     $this->site->setUpdatedValue();
     $this->assertNotEquals($date, $this->site->getUpdated());
 }