timezone_getEquivalentID_error.phpt 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. IntlTimeZone::getEquivalentID(): 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::getEquivalentID('foo'));
  11. var_dump(IntlTimeZone::getEquivalentID('foo', 'bar'));
  12. var_dump(IntlTimeZone::getEquivalentID('Europe/Lisbon', 0, 1));
  13. var_dump(IntlTimeZone::getEquivalentID("foo\x80", 0));
  14. --EXPECTF--
  15. Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 1 given in %s on line %d
  16. Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
  17. bool(false)
  18. Warning: IntlTimeZone::getEquivalentID() expects parameter 2 to be long, string given in %s on line %d
  19. Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
  20. bool(false)
  21. Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 3 given in %s on line %d
  22. Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
  23. bool(false)
  24. Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: could not convert time zone id to UTF-16 in %s on line %d
  25. bool(false)