/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/intl/tests/resourcebundle_create.phpt
50 строк
925 B
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-- Test ResourceBundle::__construct() - existing/missing bundles/locales --EXTENSIONS-- intl --FILE-- <?php include "resourcebundle.inc"; function ut_main() { $str_res = ''; // all fine $r1 = ut_resourcebundle_create( 'root', BUNDLE ); $str_res .= debug( $r1 ); $str_res .= print_r( $r1['teststring'], true)."\n"; // non-root one $r1 = ut_resourcebundle_create( 'es', BUNDLE ); $str_res .= debug( $r1 ); $str_res .= print_r( $r1['teststring'], true)."\n"; // fall back $r1 = ut_resourcebundle_create( 'en_US', BUNDLE ); $str_res .= debug( $r1 ); $str_res .= print_r( $r1['testsring'], true); return $str_res; } include_once( 'ut_common.inc' ); ut_run(); ?> --EXPECT-- ResourceBundle Object ( ) 0: U_ZERO_ERROR Hello World! ResourceBundle Object ( ) 0: U_ZERO_ERROR Hola Mundo! ResourceBundle Object ( ) -127: U_USING_DEFAULT_WARNING