summaryrefslogtreecommitdiff
path: root/ext/intl/tests/dateformat_invalid_timezone.phpt
blob: a19129391af96dfcb4cd52de2b46ab7f947a5544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
IntlDateFormat constructor failure
--INI--
date.timezone=Mars/Utopia_Planitia
--SKIPIF--
<?php
extension_loaded('intl') || print 'skip';
--FILE--
<?php

try {
  new \IntlDateFormatter('en_US', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL);
  echo "Wat?";
} catch (\IntlException $e) {
  echo $e->getMessage();
}
?>
--EXPECT--
IntlDateFormatter::__construct(): Invalid date.timezone value 'Mars/Utopia_Planitia', we selected the timezone 'UTC' for now.