Skip to content

Commit

Permalink
Fix file name case issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Omranic committed Nov 26, 2016
1 parent 0e834e5 commit e1ed230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Country.php
Expand Up @@ -291,7 +291,7 @@ public function getTranslations()
$natives = $this->getNativeNames() ?: [];

// Get other translations
$file = __DIR__.'/../resources/data/'.$this->getIsoAlpha2().'.translations.json';
$file = __DIR__.'/../resources/data/'.strtolower($this->getIsoAlpha2()).'.translations.json';
$translations = file_exists($file) ? json_decode(file_get_contents($file), true) : [];

// Merge all names together
Expand Down
6 changes: 3 additions & 3 deletions tests/CountryTest.php
Expand Up @@ -1182,7 +1182,7 @@ public function it_returns_null_when_missing_emoji()
/** @test */
public function it_returns_geojson()
{
$file = __DIR__.'/../resources/data/'.$this->longCountry->getIsoAlpha2().'.geo.json';
$file = __DIR__.'/../resources/data/'.strtolower($this->longCountry->getIsoAlpha2()).'.geo.json';

$this->assertEquals(file_get_contents($file), $this->longCountry->getGeoJson());
}
Expand All @@ -1198,7 +1198,7 @@ public function it_returns_null_when_missing_geojson()
/** @test */
public function it_returns_flag()
{
$file = __DIR__.'/../resources/data/'.$this->longCountry->getIsoAlpha2().'.svg';
$file = __DIR__.'/../resources/data/'.strtolower($this->longCountry->getIsoAlpha2()).'.svg';

$this->assertEquals(file_get_contents($file), $this->longCountry->getFlag());
}
Expand All @@ -1214,7 +1214,7 @@ public function it_returns_null_when_missing_flag()
/** @test */
public function it_returns_divisions()
{
$file = __DIR__.'/../resources/data/'.$this->longCountry->getIsoAlpha2().'.divisions.json';
$file = __DIR__.'/../resources/data/'.strtolower($this->longCountry->getIsoAlpha2()).'.divisions.json';

$this->assertEquals(json_decode(file_get_contents($file), true), $this->longCountry->getDivisions());
}
Expand Down

0 comments on commit e1ed230

Please sign in to comment.