Skip to content

Commit

Permalink
Merge pull request #25 from Talentify/feature/french-language
Browse files Browse the repository at this point in the history
Add french language
  • Loading branch information
Joilson committed Dec 8, 2020
2 parents 43120b7 + 343fe15 commit c469e9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions resources/languages/iso6391.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
'name' => 'Portuguese',
'code' => 'pt',
],
'fr' => [
'name' => 'French',
'code' => 'fr',
],
];
5 changes: 5 additions & 0 deletions src/Geography/CountryList.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ public static function ES() : Country
{
return new Country('Spain', 'ES', 'ESP');
}

public static function FR() : Country
{
return new Country('France', 'FR', 'FRA');
}
}
1 change: 1 addition & 0 deletions tests/Geography/CountryListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function objectDataProvider() : array
[CountryList::BR(), ['Brazil', 'BR', 'BRA']],
[CountryList::US(), ['United States Of America', 'US', 'USA']],
[CountryList::ES(), ['Spain', 'ES', 'ESP']],
[CountryList::FR(), ['France', 'FR', 'FRA']],
];
}
}
2 changes: 1 addition & 1 deletion tests/Linguistics/Languages/ISO6391LanguagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testGetAll() : void
$results[] = $item;
}

$this->assertCount(3, $results);
$this->assertCount(4, $results);
$this->assertTrue(
(new Language('English', 'en'))->equals($results[0])
);
Expand Down

0 comments on commit c469e9d

Please sign in to comment.