timezone_createTimeZoneIDEnumeration_error.phpt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. IntlTimeZone::createTimeZoneIDEnumeration(): errors
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('intl'))
  6. die('skip intl extension not enabled');
  7. if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
  8. die('skip for ICU 4.8+');
  9. --FILE--
  10. <?php
  11. ini_set("intl.error_level", E_WARNING);
  12. var_dump(IntlTimeZone::createTimeZoneIDEnumeration());
  13. var_dump(IntlTimeZone::createTimeZoneIDEnumeration(array()));
  14. var_dump(IntlTimeZone::createTimeZoneIDEnumeration(-1));
  15. var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, array()));
  16. var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, "PT", "a80"));
  17. --EXPECTF--
  18. Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects at least 1 parameter, 0 given in %s on line %d
  19. Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
  20. bool(false)
  21. Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 1 to be int, array given in %s on line %d
  22. Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
  23. bool(false)
  24. Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad zone type in %s on line %d
  25. bool(false)
  26. Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 2 to be string, array given in %s on line %d
  27. Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
  28. bool(false)
  29. Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 3 to be int, string given in %s on line %d
  30. Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
  31. bool(false)