Example #1
0
 /**
  * @dataProvider provideTestFromTimestamp
  *
  * @param int    $timestamp
  * @param string $timezoneStr
  * @param string $expected
  */
 public function testFromTimestamp($timestamp, $timezoneStr, $expected)
 {
     $subject = LocalDate::fromTimestamp($timestamp, $timezoneStr);
     $this->assertEquals($timestamp, $subject->getTimestamp(), 'Setting the timezone must NOT change the timestamp');
     $this->assertEquals($expected, $subject->format(), 'The date must be formatted correctly');
 }