summaryrefslogtreecommitdiff
path: root/ext/intl/tests/bug62017.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/tests/bug62017.phpt')
-rw-r--r--ext/intl/tests/bug62017.phpt14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/intl/tests/bug62017.phpt b/ext/intl/tests/bug62017.phpt
index 50aeae4806..2f3c816f99 100644
--- a/ext/intl/tests/bug62017.phpt
+++ b/ext/intl/tests/bug62017.phpt
@@ -10,13 +10,15 @@ ini_set('intl.error_level', E_WARNING);
var_dump(
datefmt_create('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "\xFF",
IntlDateFormatter::GREGORIAN, 'a'));
-var_dump(
- new IntlDateFormatter('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "Europe/Lisbon",
- IntlDateFormatter::GREGORIAN, "\x80"));
+try {
+ var_dump(
+ new IntlDateFormatter('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "Europe/Lisbon",
+ IntlDateFormatter::GREGORIAN, "\x80"));
+} catch (IntlException $e) {
+ echo PHP_EOL."Exception: " . $e->getMessage() . " in " . $e->getFile() . " on line " . $e->getLine() . PHP_EOL;
+}
--EXPECTF--
Warning: datefmt_create(): datefmt_create: Time zone identifier given is not a valid UTF-8 string in %s on line %d
NULL
-Warning: IntlDateFormatter::__construct(): datefmt_create: error converting pattern to UTF-16 in %s on line %d
-NULL
-
+Exception: IntlDateFormatter::__construct(): datefmt_create: error converting pattern to UTF-16 in %sbug62017.php on line %d