resourcebundle_internal.phpt 667 B

12345678910111213141516171819202122
  1. --TEST--
  2. Test ResourceBundle::__construct() with internal ICU bundles
  3. --EXTENSIONS--
  4. intl
  5. --SKIPIF--
  6. <?php if( !defined('INTL_ICU_DATA_VERSION')) print 'skip INTL_ICU_DATA_VERSION constant not defined'; ?>
  7. <?php if( version_compare(INTL_ICU_DATA_VERSION, '4.4', '<')) print 'skip for ICU >= 4.4'; ?>
  8. --FILE--
  9. <?php
  10. $b = new ResourceBundle('de_DE', 'ICUDATA-region');
  11. var_dump($b->get('Countries')->get('DE'));
  12. $b = new ResourceBundle('icuver', 'ICUDATA');
  13. var_dump($b->get('ICUVersion') !== NULL);
  14. $b = new ResourceBundle('supplementalData', 'ICUDATA', false);
  15. var_dump($b->get('cldrVersion') !== NULL);
  16. ?>
  17. --EXPECT--
  18. string(11) "Deutschland"
  19. bool(true)
  20. bool(true)