diff options
Diffstat (limited to 'ext/intl/tests/timezone_createTimeZone_error.phpt')
-rw-r--r-- | ext/intl/tests/timezone_createTimeZone_error.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/intl/tests/timezone_createTimeZone_error.phpt b/ext/intl/tests/timezone_createTimeZone_error.phpt new file mode 100644 index 0000000000..2be821a67e --- /dev/null +++ b/ext/intl/tests/timezone_createTimeZone_error.phpt @@ -0,0 +1,34 @@ +--TEST-- +IntlTimeZone::createTimeZone(): errors +--SKIPIF-- +<?php +if (!extension_loaded('intl')) + die('skip intl extension not enabled'); +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +var_dump(IntlTimeZone::createTimeZone()); +var_dump(IntlTimeZone::createTimeZone(new stdClass)); +var_dump(IntlTimeZone::createTimeZone("foo bar", 4)); +var_dump(IntlTimeZone::createTimeZone("foo\x80")); + +--EXPECTF-- + +Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d +NULL + +Warning: IntlTimeZone::createTimeZone() expects parameter 1 to be string, object given in %s on line %d + +Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d +NULL + +Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 2 given in %s on line %d + +Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d +NULL + +Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: could not convert time zone id to UTF-16 in %s on line %d +NULL |