diff options
| author | Stanislav Malyshev <stas@php.net> | 2011-04-17 21:56:26 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2011-04-17 21:56:26 +0000 |
| commit | 339f46237d82cec13d2afe01acfa3046a1b48798 (patch) | |
| tree | 005cf1de6f4c56ed17c2b6bec20916b75ce40cc7 /ext/intl/tests | |
| parent | 1b6dd18082ee055933e1ed040db3dbfcf34d60da (diff) | |
| download | php-git-339f46237d82cec13d2afe01acfa3046a1b48798.tar.gz | |
implement FR #54540 - Allow loading of arbitrary resource bundles when fallback is disabled
Diffstat (limited to 'ext/intl/tests')
| -rw-r--r-- | ext/intl/tests/resourcebundle_create.phpt | 2 | ||||
| -rw-r--r-- | ext/intl/tests/resourcebundle_internal.phpt | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/ext/intl/tests/resourcebundle_create.phpt b/ext/intl/tests/resourcebundle_create.phpt index 4d96d3eff7..2bf4f556a8 100644 --- a/ext/intl/tests/resourcebundle_create.phpt +++ b/ext/intl/tests/resourcebundle_create.phpt @@ -57,6 +57,6 @@ ResourceBundle Object -127: U_USING_DEFAULT_WARNING NULL - -127: resourcebundle_ctor: Cannot load libICU resource '%s/resourcebundle' without fallback from en_US to root: U_USING_DEFAULT_WARNING + 2: resourcebundle_ctor: Cannot load libICU resource bundle: U_MISSING_RESOURCE_ERROR NULL 2: resourcebundle_ctor: Cannot load libICU resource bundle: U_MISSING_RESOURCE_ERROR diff --git a/ext/intl/tests/resourcebundle_internal.phpt b/ext/intl/tests/resourcebundle_internal.phpt new file mode 100644 index 0000000000..7aefd854ce --- /dev/null +++ b/ext/intl/tests/resourcebundle_internal.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test ResourceBundle::__construct() with internal ICU bundles +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +--FILE-- +<?php +$b = new ResourceBundle('de_DE', 'ICUDATA-region'); +var_dump($b->get('Countries')->get('DE')); + +$b = new ResourceBundle('icuver', 'ICUDATA'); +var_dump($b->get('ICUVersion') !== NULL); + +$b = new ResourceBundle('supplementalData', 'ICUDATA', false); +var_dump($b->get('cldrVersion') !== NULL); +?> +--EXPECTF-- +string(11) "Deutschland" +bool(true) +bool(true) |
