timezone_createTimeZone_error.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. IntlTimeZone::createTimeZone(): 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::createTimeZone());
  11. var_dump(IntlTimeZone::createTimeZone(new stdClass));
  12. var_dump(IntlTimeZone::createTimeZone("foo bar", 4));
  13. var_dump(IntlTimeZone::createTimeZone("foo\x80"));
  14. --EXPECTF--
  15. Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
  16. Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
  17. NULL
  18. Warning: IntlTimeZone::createTimeZone() expects parameter 1 to be string, object given in %s on line %d
  19. Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
  20. NULL
  21. Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
  22. Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
  23. NULL
  24. Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: could not convert time zone id to UTF-16 in %s on line %d
  25. NULL