summaryrefslogtreecommitdiff
path: root/ext/intl/tests/dateformat_getTimeZone_error.phpt
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-06-04 00:02:35 +0200
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-06-04 00:02:35 +0200
commit758f0686d41cd39176f5055c50f0b094580cbbf0 (patch)
treebea7b511738d6818cc303ff56a6bd96507357c4c /ext/intl/tests/dateformat_getTimeZone_error.phpt
parenteb346ef0f419b90739aadfb6cc7b7436c5b521d9 (diff)
downloadphp-git-758f0686d41cd39176f5055c50f0b094580cbbf0.tar.gz
Added and fixed tests given eb346ef
Diffstat (limited to 'ext/intl/tests/dateformat_getTimeZone_error.phpt')
-rw-r--r--ext/intl/tests/dateformat_getTimeZone_error.phpt39
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/intl/tests/dateformat_getTimeZone_error.phpt b/ext/intl/tests/dateformat_getTimeZone_error.phpt
new file mode 100644
index 0000000000..c9d49fde43
--- /dev/null
+++ b/ext/intl/tests/dateformat_getTimeZone_error.phpt
@@ -0,0 +1,39 @@
+--TEST--
+IntlDateFormatter::getTimeZone(): bad args
+--FILE--
+<?php
+ini_set("intl.error_level", E_WARNING);
+ini_set("intl.default_locale", "pt_PT");
+ini_set("date.timezone", 'Atlantic/Azores');
+
+$df = new IntlDateFormatter(NULL, 0, 0);
+
+var_dump($df->getTimeZone(9));
+var_dump(datefmt_get_timezone($df, 9));
+var_dump(datefmt_get_timezone($df, 9));
+var_dump(datefmt_get_timezone(new stdclass));
+
+?>
+==DONE==
+--EXPECTF--
+
+Warning: IntlDateFormatter::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: IntlDateFormatter::getTimeZone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+
+Warning: datefmt_get_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
+
+Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
+bool(false)
+==DONE==