dateformat_invalid_timezone.phpt 464 B

123456789101112131415161718
  1. --TEST--
  2. IntlDateFormat constructor failure
  3. --INI--
  4. date.timezone=Mars/Utopia_Planitia
  5. --SKIPIF--
  6. <?php
  7. extension_loaded('intl') || print 'skip';
  8. --FILE--
  9. <?php
  10. try {
  11. new \IntlDateFormatter('en_US', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL);
  12. echo "Wat?";
  13. } catch (\IntlException $e) {
  14. echo $e->getMessage();
  15. }
  16. --EXPECT--
  17. IntlDateFormatter::__construct(): Invalid date.timezone value 'Mars/Utopia_Planitia', we selected the timezone 'UTC' for now.