13
13
14
14
use Symfony \Component \Intl \Exception \MissingResourceException ;
15
15
use Symfony \Component \Intl \Languages ;
16
+ use Symfony \Component \Intl \Util \IntlTestHelper ;
16
17
17
18
/**
18
19
* @group intl-data
@@ -1713,6 +1714,10 @@ public function testGetLanguageCodes()
1713
1714
*/
1714
1715
public function testGetNames ($ displayLocale )
1715
1716
{
1717
+ if ('en ' !== $ displayLocale ) {
1718
+ IntlTestHelper::requireFullIntl ($ this );
1719
+ }
1720
+
1716
1721
$ languages = array_keys ($ names = Languages::getNames ($ displayLocale ));
1717
1722
1718
1723
sort ($ languages );
@@ -1730,6 +1735,8 @@ public function testGetNames($displayLocale)
1730
1735
1731
1736
public function testGetNamesDefaultLocale ()
1732
1737
{
1738
+ IntlTestHelper::requireFullIntl ($ this );
1739
+
1733
1740
\Locale::setDefault ('de_AT ' );
1734
1741
1735
1742
$ this ->assertSame (Languages::getNames ('de_AT ' ), Languages::getNames ());
@@ -1740,6 +1747,10 @@ public function testGetNamesDefaultLocale()
1740
1747
*/
1741
1748
public function testGetNamesSupportsAliases ($ alias , $ ofLocale )
1742
1749
{
1750
+ if ('en ' !== $ ofLocale ) {
1751
+ IntlTestHelper::requireFullIntl ($ this );
1752
+ }
1753
+
1743
1754
// Can't use assertSame(), because some aliases contain scripts with
1744
1755
// different collation (=order of output) than their aliased locale
1745
1756
// e.g. sr_Latn_ME => sr_ME
@@ -1751,6 +1762,10 @@ public function testGetNamesSupportsAliases($alias, $ofLocale)
1751
1762
*/
1752
1763
public function testGetName ($ displayLocale )
1753
1764
{
1765
+ if ('en ' !== $ displayLocale ) {
1766
+ IntlTestHelper::requireFullIntl ($ this );
1767
+ }
1768
+
1754
1769
$ names = Languages::getNames ($ displayLocale );
1755
1770
1756
1771
foreach ($ names as $ language => $ name ) {
@@ -1767,6 +1782,8 @@ public function testLocalizedGetName()
1767
1782
1768
1783
public function testGetNameDefaultLocale ()
1769
1784
{
1785
+ IntlTestHelper::requireFullIntl ($ this );
1786
+
1770
1787
\Locale::setDefault ('de_AT ' );
1771
1788
1772
1789
$ names = Languages::getNames ('de_AT ' );
@@ -1877,6 +1894,10 @@ public function testAlpha3CodeExists()
1877
1894
*/
1878
1895
public function testGetAlpha3Name ($ displayLocale )
1879
1896
{
1897
+ if ('en ' !== $ displayLocale ) {
1898
+ IntlTestHelper::requireFullIntl ($ this );
1899
+ }
1900
+
1880
1901
$ names = Languages::getAlpha3Names ($ displayLocale );
1881
1902
1882
1903
foreach ($ names as $ language => $ name ) {
@@ -1896,6 +1917,10 @@ public function testGetAlpha3NameWithInvalidLanguageCode()
1896
1917
*/
1897
1918
public function testGetAlpha3Names ($ displayLocale )
1898
1919
{
1920
+ if ('en ' !== $ displayLocale ) {
1921
+ IntlTestHelper::requireFullIntl ($ this );
1922
+ }
1923
+
1899
1924
$ languages = array_keys ($ names = Languages::getAlpha3Names ($ displayLocale ));
1900
1925
1901
1926
sort ($ languages );
0 commit comments