Example #1
0
 /**
  * Tests if the timestamp always stays the same no matter if the local timezone gets requested.
  */
 public function testTimestampDoesNotChange()
 {
     $date = new \Ilch\Date();
     $date->setTimestamp(1379521501);
     $this->assertEquals(1379521501, $date->getTimestamp(), 'The timestamp was not returned in UTC.');
     $this->assertEquals(1379521501, $date->format('U', true), 'The timestamp was not returned in UTC.');
     $this->assertEquals(1379521501, $date->format('U', false), 'The timestamp was not returned in UTC.');
 }