示例#1
0
 /**
  * @dataProvider validDataProvider
  */
 public function testMethod($jdn, $year, $month, $day)
 {
     $this->assertEquals("{$month}/{$day}/{$year}", Calender::jdToEthiopian($jdn));
     $date = Calender::jdToEthiopian($jdn, true);
     $this->assertArrayHasKey('day', $date);
     $this->assertArrayHasKey('month', $date);
     $this->assertArrayHasKey('year', $date);
     $this->assertEquals($date['day'], $day);
     $this->assertEquals($date['month'], $month);
     $this->assertEquals($date['year'], $year);
 }
示例#2
0
 /**
  * @dataProvider validDataProvider
  */
 public function testMethod($jdn, $year, $month, $day)
 {
     $this->assertEquals($jdn, Calender::ethiopianToJd($month, $day, $year));
 }
 /**
  * @dataProvider methodDataProvider
  */
 public function testMethod($year, $expected)
 {
     $this->assertEquals($expected, Calender::isEthiopianLeapYear($year));
 }
 /**
  * @dataProvider methodDataProvider
  */
 public function testMethod($month, $day, $year, $expected)
 {
     $this->assertEquals($expected, Calender::ethiopianCheckDate($month, $day, $year));
 }