Skip to content

Commit

Permalink
Fix failing tests (#265)
Browse files Browse the repository at this point in the history
* Fix failing tests

* Change the date creation logic in test to include day name too
  • Loading branch information
nootanghimire authored and jenssegers committed Dec 5, 2017
1 parent aeacbee commit c878b7b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
24 changes: 12 additions & 12 deletions tests/TranslationJaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ public function setUp()
*/
public function it_can_translate_month()
{
$jan = Date::createFromFormat('m', '01');
$feb = Date::createFromFormat('m', '02');
$mar = Date::createFromFormat('m', '03');
$apr = Date::createFromFormat('m', '04');
$may = Date::createFromFormat('m', '05');
$jun = Date::createFromFormat('m', '06');
$jul = Date::createFromFormat('m', '07');
$aug = Date::createFromFormat('m', '08');
$sep = Date::createFromFormat('m', '09');
$oct = Date::createFromFormat('m', '10');
$nov = Date::createFromFormat('m', '11');
$dec = Date::createFromFormat('m', '12');
$jan = Date::createFromFormat('m-d', '01-01');
$feb = Date::createFromFormat('m-d', '02-01');
$mar = Date::createFromFormat('m-d', '03-01');
$apr = Date::createFromFormat('m-d', '04-01');
$may = Date::createFromFormat('m-d', '05-01');
$jun = Date::createFromFormat('m-d', '06-01');
$jul = Date::createFromFormat('m-d', '07-01');
$aug = Date::createFromFormat('m-d', '08-01');
$sep = Date::createFromFormat('m-d', '09-01');
$oct = Date::createFromFormat('m-d', '10-01');
$nov = Date::createFromFormat('m-d', '11-01');
$dec = Date::createFromFormat('m-d', '12-01');

$this->assertEquals('1月', $jan->format('F'));
$this->assertEquals('2月', $feb->format('F'));
Expand Down
28 changes: 14 additions & 14 deletions tests/TranslationTaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ public function setUp()
/** @test */
public function it_translates_month()
{
$jan = Date::createFromFormat('m', '01');
$feb = Date::createFromFormat('m', '02');
$mar = Date::createFromFormat('m', '03');
$apr = Date::createFromFormat('m', '04');
$may = Date::createFromFormat('m', '05');
$jun = Date::createFromFormat('m', '06');
$jul = Date::createFromFormat('m', '07');
$aug = Date::createFromFormat('m', '08');
$sep = Date::createFromFormat('m', '09');
$okt = Date::createFromFormat('m', '10');
$nov = Date::createFromFormat('m', '11');
$dez = Date::createFromFormat('m', '12');
$jan = Date::createFromFormat('m-d', '01-01');
$feb = Date::createFromFormat('m-d', '02-01');
$mar = Date::createFromFormat('m-d', '03-01');
$apr = Date::createFromFormat('m-d', '04-01');
$may = Date::createFromFormat('m-d', '05-01');
$jun = Date::createFromFormat('m-d', '06-01');
$jul = Date::createFromFormat('m-d', '07-01');
$aug = Date::createFromFormat('m-d', '08-01');
$sep = Date::createFromFormat('m-d', '09-01');
$oct = Date::createFromFormat('m-d', '10-01');
$nov = Date::createFromFormat('m-d', '11-01');
$dec = Date::createFromFormat('m-d', '12-01');

$this->assertEquals('தை', $jan->format('F'));
$this->assertEquals('மாசி', $feb->format('F'));
Expand All @@ -40,9 +40,9 @@ public function it_translates_month()
$this->assertEquals('ஆடி', $jul->format('F'));
$this->assertEquals('ஆவணி', $aug->format('F'));
$this->assertEquals('புரட்டாசி', $sep->format('F'));
$this->assertEquals('ஐப்பசி', $okt->format('F'));
$this->assertEquals('ஐப்பசி', $oct->format('F'));
$this->assertEquals('கார்த்திகை', $nov->format('F'));
$this->assertEquals('மார்கழி', $dez->format('F'));
$this->assertEquals('மார்கழி', $dec->format('F'));
}

/** @test */
Expand Down

0 comments on commit c878b7b

Please sign in to comment.