mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-12-12 17:37:34 +01:00
23 lines
619 B
PHP
Executable File
23 lines
619 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require_once __DIR__ . '/_bootstrap.php';
|
|
|
|
$rc = 0;
|
|
echo "Checking languages:\n";
|
|
foreach ([
|
|
'en' => "\xC2\xA4#,##0.00",
|
|
'it' => "#,##0.00\xC2\xA0\xC2\xA4",
|
|
] as $locale => $expectedCurrencyFormat) {
|
|
echo "- {$locale}: ";
|
|
$formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY);
|
|
$actualCurrencyFormat = $formatter->getPattern();
|
|
if ($actualCurrencyFormat === $expectedCurrencyFormat) {
|
|
echo "ok\n";
|
|
} else {
|
|
echo "failed (expected: '{$expectedCurrencyFormat}', actual: '{$actualCurrencyFormat}')\n";
|
|
$rc = 1;
|
|
}
|
|
}
|
|
exit($rc);
|