1--TEST--
2IntlDateFormatter::setTimeZone() bad args
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10ini_set("intl.default_locale", "pt_PT");
11ini_set("date.timezone", 'Atlantic/Azores');
12
13$df = new IntlDateFormatter(NULL, 0, 0);
14
15var_dump($df->setTimeZone());
16var_dump(datefmt_set_timezone());
17var_dump($df->setTimeZone(array()));
18var_dump($df->setTimeZone(1, 2));
19var_dump($df->setTimeZone('non existing timezone'));
20var_dump(datefmt_set_timezone(new stdclass, 'UTC'));
21
22?>
23==DONE==
24--EXPECTF--
25Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
26
27Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
28bool(false)
29
30Warning: datefmt_set_timezone() expects exactly 2 parameters, 0 given in %s on line %d
31
32Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
33bool(false)
34
35Notice: Array to string conversion in %s on line %d
36
37Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'Array' in %s on line %d
38bool(false)
39
40Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
41
42Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
43bool(false)
44
45Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'non existing timezone' in %s on line %d
46bool(false)
47
48Warning: datefmt_set_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
49
50Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
51bool(false)
52==DONE==
53