1--TEST--
2IntlTimeZone::getRegion(): errors
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
8	die('skip for ICU 4.8+');
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12
13var_dump(IntlTimeZone::getRegion());
14var_dump(IntlTimeZone::getRegion(array()));
15var_dump(IntlTimeZone::getRegion('Europe/Lisbon', 4));
16var_dump(IntlTimeZone::getRegion("foo\x81"));
17var_dump(IntlTimeZone::getRegion("foo"));
18--EXPECTF--
19Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 0 given in %s on line %d
20
21Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
22bool(false)
23
24Warning: IntlTimeZone::getRegion() expects parameter 1 to be string, array given in %s on line %d
25
26Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
27bool(false)
28
29Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 2 given in %s on line %d
30
31Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
32bool(false)
33
34Warning: IntlTimeZone::getRegion(): intltz_get_region: could not convert time zone id to UTF-16 in %s on line %d
35bool(false)
36
37Warning: IntlTimeZone::getRegion(): intltz_get_region: Error obtaining region in %s on line %d
38bool(false)
39