1313
1414use Symfony \Component \Intl \Exception \MissingResourceException ;
1515use Symfony \Component \Intl \Languages ;
16+ use Symfony \Component \Intl \Util \IntlTestHelper ;
1617
1718/**
1819 * @group intl-data
@@ -1713,6 +1714,10 @@ public function testGetLanguageCodes()
17131714 */
17141715 public function testGetNames ($ displayLocale )
17151716 {
1717+ if ('en ' !== $ displayLocale ) {
1718+ IntlTestHelper::requireFullIntl ($ this );
1719+ }
1720+
17161721 $ languages = array_keys ($ names = Languages::getNames ($ displayLocale ));
17171722
17181723 sort ($ languages );
@@ -1730,6 +1735,8 @@ public function testGetNames($displayLocale)
17301735
17311736 public function testGetNamesDefaultLocale ()
17321737 {
1738+ IntlTestHelper::requireFullIntl ($ this );
1739+
17331740 \Locale::setDefault ('de_AT ' );
17341741
17351742 $ this ->assertSame (Languages::getNames ('de_AT ' ), Languages::getNames ());
@@ -1740,6 +1747,10 @@ public function testGetNamesDefaultLocale()
17401747 */
17411748 public function testGetNamesSupportsAliases ($ alias , $ ofLocale )
17421749 {
1750+ if ('en ' !== $ ofLocale ) {
1751+ IntlTestHelper::requireFullIntl ($ this );
1752+ }
1753+
17431754 // Can't use assertSame(), because some aliases contain scripts with
17441755 // different collation (=order of output) than their aliased locale
17451756 // e.g. sr_Latn_ME => sr_ME
@@ -1751,6 +1762,10 @@ public function testGetNamesSupportsAliases($alias, $ofLocale)
17511762 */
17521763 public function testGetName ($ displayLocale )
17531764 {
1765+ if ('en ' !== $ displayLocale ) {
1766+ IntlTestHelper::requireFullIntl ($ this );
1767+ }
1768+
17541769 $ names = Languages::getNames ($ displayLocale );
17551770
17561771 foreach ($ names as $ language => $ name ) {
@@ -1767,6 +1782,8 @@ public function testLocalizedGetName()
17671782
17681783 public function testGetNameDefaultLocale ()
17691784 {
1785+ IntlTestHelper::requireFullIntl ($ this );
1786+
17701787 \Locale::setDefault ('de_AT ' );
17711788
17721789 $ names = Languages::getNames ('de_AT ' );
@@ -1877,6 +1894,10 @@ public function testAlpha3CodeExists()
18771894 */
18781895 public function testGetAlpha3Name ($ displayLocale )
18791896 {
1897+ if ('en ' !== $ displayLocale ) {
1898+ IntlTestHelper::requireFullIntl ($ this );
1899+ }
1900+
18801901 $ names = Languages::getAlpha3Names ($ displayLocale );
18811902
18821903 foreach ($ names as $ language => $ name ) {
@@ -1896,6 +1917,10 @@ public function testGetAlpha3NameWithInvalidLanguageCode()
18961917 */
18971918 public function testGetAlpha3Names ($ displayLocale )
18981919 {
1920+ if ('en ' !== $ displayLocale ) {
1921+ IntlTestHelper::requireFullIntl ($ this );
1922+ }
1923+
18991924 $ languages = array_keys ($ names = Languages::getAlpha3Names ($ displayLocale ));
19001925
19011926 sort ($ languages );
0 commit comments