com php-src: fork test for ICU >= 55.1 compat : ext/intl/tests/dateformat_get_set_timezone_varian t4.phpt ext/intl/tests/dateformat_get_set_timezone
_variant5.phpt

From: Date: Mon, 18 May 2015 20:37:25 +0000
Subject: com php-src: fork test for ICU >= 55.1 compat : ext/intl/tests/dateformat_get_set_timezone_varian t4.phpt ext/intl/tests/dateformat_get_set_timezone
_variant5.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86795@lists.php.net to get a copy of this message
Commit: bb27f4ca8b8a43cf1d34629bcce1220d8d2e016a Author: Anatol Belski <ab@php.net> Mon, 18 May 2015 22:10:38 +0200 Parents: 83f98277c2f25aa15f9d2980e0c58aa094d0392f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bb27f4ca8b8a43cf1d34629bcce1220d8d2e016a Log: fork test for ICU >= 55.1 compat Changed paths: M ext/intl/tests/dateformat_get_set_timezone_variant4.phpt A ext/intl/tests/dateformat_get_set_timezone_variant5.phpt Diff: diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt index adedd74...8a563d8 100644 --- a/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt +++ b/ext/intl/tests/dateformat_get_set_timezone_variant4.phpt @@ -4,6 +4,7 @@ IntlDateFormatter: get/setTimeZone() <?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> <?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); diff --git a/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt new file mode 100644 index 0000000..1487751 --- /dev/null +++ b/ext/intl/tests/dateformat_get_set_timezone_variant5.phpt @@ -0,0 +1,62 @@ +--TEST-- +IntlDateFormatter: get/setTimeZone() +--SKIPIF-- +<?php +if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> +<?php if (version_compare(INTL_ICU_VERSION, '55.1') < 0) die('skip for ICU >= 55.1'); ?> +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); +ini_set("intl.default_locale", "pt_PT"); +ini_set("date.timezone", 'Atlantic/Azores'); + +$ts = strtotime('2012-01-01 00:00:00 UTC'); + +function d(IntlDateFormatter $df) { +global $ts; +echo $df->format($ts), "\n"; +var_dump( +$df->getTimeZoneID(), +$df->getTimeZone()->getID()); +echo "\n"; +} + +$df = new IntlDateFormatter('pt_PT', 0, 0, 'Europe/Minsk'); +d($df); + +$df->setTimeZone(NULL); +d($df); + +$df->setTimeZone('Europe/Madrid'); +d($df); + +$df->setTimeZone(IntlTimeZone::createTimeZone('Europe/Paris')); +d($df); + +$df->setTimeZone(new DateTimeZone('Europe/Amsterdam')); +d($df); + +?> +==DONE== +--EXPECTF-- +domingo, 1 de janeiro de 2012 às 03:00:00 Hor%s do Extremo Leste da Europa +string(12) "Europe/Minsk" +string(12) "Europe/Minsk" + +sábado, 31 de dezembro de 2011 às 23:00:00 Hor%s padrão %Sdos Açores +string(15) "Atlantic/Azores" +string(15) "Atlantic/Azores" + +domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s padrão %Sda Europa Central +string(13) "Europe/Madrid" +string(13) "Europe/Madrid" + +domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s padrão %Sda Europa Central +string(12) "Europe/Paris" +string(12) "Europe/Paris" + +domingo, 1 de janeiro de 2012 às 01:00:00 Hor%s padrão %Sda Europa Central +string(16) "Europe/Amsterdam" +string(16) "Europe/Amsterdam" + +==DONE==

« previous php.cvs (#86795) next »