8000 [Intl] Update ICU data to 60.1 by jakzal · Pull Request #24909 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Intl] Update tests for ICU 60.1
  • Loading branch information
jakzal committed Nov 10, 2017
commit 7dc9e6640b386cdc7e73602e3be6c9cfc78f4f5e
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'CLE',
'CLF',
'CLP',
'CNH',
'CNX',
'CNY',
'COP',
Expand Down Expand Up @@ -251,6 +252,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'SRG',
'SSP',
'STD',
'STN',
'SUR',
'SVC',
'SYP',
Expand Down Expand Up @@ -312,14 +314,16 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest

protected static $alpha3ToNumeric = array(
'AFA' => 4,
'ALK' => 8,
'ALL' => 8,
'DZD' => 12,
'ADP' => 20,
'AON' => 24,
'AOK' => 24,
'AZM' => 31,
'ARS' => 32,
'ARP' => 32,
'ARA' => 32,
'ARP' => 32,
'ARS' => 32,
'AUD' => 36,
'ATS' => 40,
'BSD' => 44,
Expand All @@ -331,16 +335,19 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'BMD' => 60,
'BTN' => 64,
'BOB' => 68,
'BOP' => 68,
'BAD' => 70,
'BWP' => 72,
'BRN' => 76,
'BRE' => 76,
'BRC' => 76,
'BRB' => 76,
'BZD' => 84,
'SBD' => 90,
'BND' => 96,
'BGL' => 100,
'MMK' => 104,
'BUK' => 104,
'BIF' => 108,
'BYB' => 112,
'KHR' => 116,
Expand Down Expand Up @@ -383,18 +390,22 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'GRD' => 300,
'GTQ' => 320,
'GNF' => 324,
'GNS' => 324,
'GYD' => 328,
'HTG' => 332,
'HNL' => 340,
'HKD' => 344,
'HUF' => 348,
'ISK' => 352,
'ISJ' => 352,
'INR' => 356,
'IDR' => 360,
'IRR' => 364,
'IQD' => 368,
'IEP' => 372,
'ILS' => 376,
'ILP' => 376,
'ILR' => 376,
'ITL' => 380,
'JMD' => 388,
'JPY' => 392,
Expand All @@ -421,14 +432,17 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'MYR' => 458,
'MVR' => 462,
'MLF' => 466,
'MTP' => 470,
'MTL' => 470,
'MRO' => 478,
'MUR' => 480,
'MXN' => 484,
'MXP' => 484,
'MNT' => 496,
'MDL' => 498,
'MAD' => 504,
'MZM' => 508,
'MZE' => 508,
'OMR' => 512,
'NAD' => 516,
'NPR' => 524,
Expand All @@ -438,6 +452,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'VUV' => 548,
'NZD' => 554,
'NIO' => 558,
'NIC' => 558,
'NGN' => 566,
'NOK' => 578,
'PKR' => 586,
Expand All @@ -451,6 +466,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'PLZ' => 616,
'PTE' => 620,
'GWP' => 624,
'GWE' => 624,
'TPE' => 626,
'QAR' => 634,
'ROL' => 642,
Expand All @@ -467,10 +483,12 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'SIT' => 705,
'SOS' => 706,
'ZAR' => 710,
'RHD' => 716,
'ZWD' => 716,
'YDD' => 720,
'ESP' => 724,
'SSP' => 728,
'SDP' => 736,
'SDD' => 736,
'SRG' => 740,
'SZL' => 748,
Expand All @@ -485,22 +503,26 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest
'TND' => 788,
'TRL' => 792,
'TMM' => 795,
'UGS' => 800,
'UGX' => 800,
'UAK' => 804,
'MKD' => 807,
'RUR' => 810,
'SUR' => 810,
'EGP' => 818,
'GBP' => 826,
'TZS' => 834,
'USD' => 840,
'UYU' => 858,
'UYP' => 858,
'UZS' => 860,
'VEB' => 862,
'WST' => 882,
'YER' => 886,
'YUN' => 890,
'CSD' => 891,
'YUM' => 891,
'YUD' => 891,
'ZMK' => 894,
'TWD' => 901,
'CUC' => 931,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ abstract class AbstractDataProviderTest extends TestCase
'ta_SG',
'te',
'te_IN',
'tg',
'tg_TJ',
'th',
'th_TH',
'th_TH_TRADITIONAL',
Expand All @@ -577,6 +579,8 @@ abstract class AbstractDataProviderTest extends TestCase
'tr',
'tr_CY',
'tr_TR',
'tt',
'tt_RU',
'ug',
'ug_CN',
'uk',
Expand All @@ -595,6 +599,8 @@ abstract class AbstractDataProviderTest extends TestCase
'uz_UZ',
'vi',
'vi_VN',
'wo',
'wo_SN',
'yi',
'yi_001',
'yo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest
'car',
'cay',
'cch',
'ccp',
'ce',
'ceb',
'cgg',
Expand Down Expand Up @@ -343,6 +344,7 @@ abstract class AbstractLanguageDataProviderTest extends Abs A36C tractDataProviderTest
'ln',
'lo',
'lol',
'lou',
'loz',
'lrc',
'lt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest
'Geok',
'Geor',
'Glag',
'Gonm',
'Goth',
'Gran',
'Grek',
Expand Down Expand Up @@ -211,6 +212,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest
'Sind',
'Sinh',
'Sora',
'Soyo',
'Sund',
'Sylo',
'Syrc',
Expand Down Expand Up @@ -240,6 +242,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest
'Xpeo',
'Xsux',
'Yiii',
'Zanb',
'Zinh',
'Zmth',
'Zsye',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Intl\DateFormatter\IntlDateFormatter;
use Symfony\Component\Intl\Globals\IntlGlobals;
use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Util\IcuVersion;

/**
* Test case for IntlDateFormatter implementations.
Expand Down Expand Up @@ -230,9 +232,6 @@ public function formatProvider()
array('s', 3630, '30'),
array('s', 43200, '0'), // 12 hours

// general
array("yyyy.MM.dd 'at' HH:mm:ss zzz", 0, '1970.01.01 at 00:00:00 UTC'),
array('K:mm a, z', 0, '0:00 AM, UTC'),
);

$dateTime = new \DateTime('@0');
Expand All @@ -243,8 +242,13 @@ public function formatProvider()
$formatData[] = array('h:mm a', $dateTime, '12:00 AM');
$formatData[] = array('yyyyy.MMMM.dd hh:mm aaa', $dateTime, '01970.January.01 12:00 AM');

$formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 UTC');
$formatData[] = array('K:mm a, z', $dateTime, '0:00 AM, UTC');
if (IcuVersion::compare(Intl::getIcuVersion(), '59.1', '>=', 1)) {
// Before ICU 59.1 GMT was used instead of UTC
$formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", 0, '1970.01.01 at 00:00:00 UTC');
$formatData[] = array('K:mm a, z', 0, '0:00 AM, UTC');
$formatData[] = array("yyyy.MM.dd 'at' HH:mm:ss zzz", $dateTime, '1970.01.01 at 00:00:00 UTC');
$formatData[] = array('K:mm a, z', $dateTime, '0:00 AM, UTC');
}

return $formatData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public function parseProvider()
array('1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3),
array('-.4suffix', (float) -0.4, '->parse() parses a negative dot float with suffix.', 3),
array('-123,4', false, '->parse() does not parse when invalid grouping used.', 6),
array('-1234,567', false, '->parse() does not parse when invalid grouping used.', 5),
array('-123,4567', false, '->parse() does not parse when invalid grouping used.', 9),
array('-123,,456', false, '->parse() does not parse when invalid grouping used.', 4),
array('-123,,456', -123.0, '->parse() parses when grouping is disabled.', 4, false),
);
Expand Down
0