timezone_getCanonicalID_error.phpt 903 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. IntlTimeZone::getCanonicalID(): errors
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('intl'))
  6. die('skip intl extension not enabled');
  7. --FILE--
  8. <?php
  9. ini_set("intl.error_level", E_WARNING);
  10. var_dump(IntlTimeZone::getCanonicalID());
  11. var_dump(IntlTimeZone::getCanonicalID(array()));
  12. var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
  13. --EXPECTF--
  14. Warning: IntlTimeZone::getCanonicalID() expects at least 1 parameter, 0 given in %s on line %d
  15. Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
  16. bool(false)
  17. Warning: IntlTimeZone::getCanonicalID() expects parameter 1 to be string, array given in %s on line %d
  18. Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
  19. bool(false)
  20. Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
  21. bool(false)