10000 minor #8423 Update LocaleTest.php (mikemeier) · symfony/symfony@a4d423e · GitHub
[go: up one dir, main page]

Skip to content

Commit a4d423e

Browse files
committed
minor #8423 Update LocaleTest.php (mikemeier)
This PR was squashed before being merged into the 2.5-dev branch (closes #8423). Discussion ---------- Update LocaleTest.php de_CH locales does not fallback to de see #5314 Commits ------- 572126b Update LocaleTest.php
2 parents 694bd72 + 572126b commit a4d423e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/Symfony/Component/Locale/Tests/LocaleTest.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,22 @@ public function testGetDisplayCountries()
3434
$this->assertEquals('Brazil', $countries['BR']);
3535
}
3636

37+
public function testGetDisplayCountriesForSwitzerland()
38+
{
39+
$countries = Locale::getDisplayCountries('de_CH');
40+
$this->assertEquals('Schweiz', $countries['CH']);
41+
}
42+
3743
public function testGetCountries()
3844
{
3945
$countries = Locale::getCountries();
40-
$this->assertTrue(in_array('BR', $countries));
46+
$this->assertContains('BR', $countries);
47+
}
48+
49+
public function testGetCountriesForSwitzerland()
50+
{
51+
$countries = Locale::getCountries();
52+
$this->assertContains('CH', $countries);
4153
}
4254

4355
public function testGetDisplayLanguages()
@@ -49,7 +61,7 @@ public function testGetDisplayLanguages()
4961
public function testGetLanguages()
5062
{
5163
$languages = Locale::getLanguages();
52-
$this->assertTrue(in_array('pt_BR', $languages));
64+
$this->assertContains('pt_BR', $languages);
5365
}
5466

5567
public function testGetDisplayLocales()
@@ -61,6 +73,6 @@ public function testGetDisplayLocales()
6173
public function testGetLocales()
6274
{
6375
$locales = Locale::getLocales();
64-
$this->assertTrue(in_array('pt', $locales));
76+
$this->assertContains('pt', $locales);
6577
}
6678
}

0 commit comments

Comments
 (0)
0