/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/intl/tests/timezone_IDforWindowsID_basic.phpt
40 строк
1 KB
Gina Peter Banyard
ext/intl: Split error tests out and stop relying on ut_common() testing (#19266)
27 июл 2025, 21:40
Не верифицирован
27 июл 2025, 21:40
191290e
Код
Авторство
О чём код?
--TEST-- IntlTimeZone::getIDForWindowsID basic test --EXTENSIONS-- intl --SKIPIF-- <?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU < 58.1'); ?> --FILE-- <?php $tzs = array( 'India Standard Time' => array(NULL), 'Pacific Standard Time' => array('001', 'CA', 'MX', 'US', 'ZZ'), 'Romance Standard Time' => array('001', 'BE', 'DK', 'ES', 'FR'), ); foreach ($tzs as $tz => $regions) { echo "** $tz\n"; foreach ($regions as $region) { var_dump(IntlTimeZone::getIDForWindowsID($tz, $region)); if (intl_get_error_code() != U_ZERO_ERROR) { echo "Error: ", intl_get_error_message(), "\n"; } } } ?> --EXPECT-- ** India Standard Time string(13) "Asia/Calcutta" ** Pacific Standard Time string(19) "America/Los_Angeles" string(17) "America/Vancouver" string(15) "America/Tijuana" string(19) "America/Los_Angeles" string(7) "PST8PDT" ** Romance Standard Time string(12) "Europe/Paris" string(15) "Europe/Brussels" string(17) "Europe/Copenhagen" string(13) "Europe/Madrid" string(12) "Europe/Paris"