/** * @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); }
/** * @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)); }