コード例 #1
0
ファイル: LocalDateTest.php プロジェクト: peekandpoke/psi
 /**
  * @dataProvider provideTestConstructor
  *
  * @param mixed  $input
  * @param string $timezoneStr
  * @param string $expected
  */
 public function testConstruct($input, $timezoneStr, $expected)
 {
     $subject = new LocalDate($input, $timezoneStr);
     $this->assertEquals($expected, $subject->format(), 'A date constructed from timestamp must be formatted correctly');
     $this->assertEquals($subject->getTimezone()->getName(), $timezoneStr, 'The timezone must be set correctly');
     $this->assertEquals($subject->getDate()->getTimezone()->getName(), $timezoneStr, 'The timezone of the inner date must be set correctly');
 }