summaryrefslogtreecommitdiff
path: root/ext/intl/tests
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-10-07 13:49:10 +0200
committerAnatol Belski <ab@php.net>2013-10-07 13:49:10 +0200
commit4840b0a749454335218f6131892031333d66142d (patch)
treec7a3d2db3c8082510324bf765c81833f5fc3a6e3 /ext/intl/tests
parentfa40290fb76370c923e8f048daf1af144ff87604 (diff)
downloadphp-git-4840b0a749454335218f6131892031333d66142d.tar.gz
fixed failing tests for ICU >= 51.2
Diffstat (limited to 'ext/intl/tests')
-rw-r--r--ext/intl/tests/bug58756_MessageFormatter.phpt5
-rw-r--r--ext/intl/tests/collator_asort.phpt1
-rw-r--r--ext/intl/tests/collator_compare.phpt1
-rw-r--r--ext/intl/tests/collator_get_sort_key.phpt4
-rw-r--r--ext/intl/tests/collator_sort.phpt1
-rw-r--r--ext/intl/tests/collator_sort_with_sort_keys.phpt1
-rw-r--r--ext/intl/tests/dateformat_calendars.phpt4
-rw-r--r--ext/intl/tests/dateformat_create_cal_arg.phpt4
-rw-r--r--ext/intl/tests/dateformat_format.phpt1
-rw-r--r--ext/intl/tests/dateformat_formatObject_calendar.phpt4
-rw-r--r--ext/intl/tests/dateformat_formatObject_datetime.phpt4
-rw-r--r--ext/intl/tests/dateformat_format_parse.phpt1
-rw-r--r--ext/intl/tests/dateformat_get_set_calendar.phpt4
-rw-r--r--ext/intl/tests/dateformat_get_set_timezone.phpt4
-rw-r--r--ext/intl/tests/dateformat_set_timezone_id2.phpt1
-rw-r--r--ext/intl/tests/dateformat_timezone_arg_variations.phpt4
-rw-r--r--ext/intl/tests/formatter_get_locale.phpt1
-rw-r--r--ext/intl/tests/locale_filter_matches2.phpt3
-rw-r--r--ext/intl/tests/locale_get_display_name2.phpt3
-rw-r--r--ext/intl/tests/locale_get_display_region2.phpt3
-rw-r--r--ext/intl/tests/locale_lookup.phpt1
-rw-r--r--ext/intl/tests/msgfmt_format_intlcalendar.phpt6
-rw-r--r--ext/intl/tests/resourcebundle_null_mandatory_args.phpt8
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt12
24 files changed, 47 insertions, 34 deletions
diff --git a/ext/intl/tests/bug58756_MessageFormatter.phpt b/ext/intl/tests/bug58756_MessageFormatter.phpt
index bbe96b7045..18566b666c 100644
--- a/ext/intl/tests/bug58756_MessageFormatter.phpt
+++ b/ext/intl/tests/bug58756_MessageFormatter.phpt
@@ -4,6 +4,9 @@ Bug #58756: w.r.t MessageFormatter
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '51.2') >= 0)
+ die('skip for ICU < 51.2');
+?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -31,4 +34,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
--EXPECT--
date: Tuesday, July 7, 2009 8:41:13 PM EDT
msgf: Tuesday, July 7, 2009 8:41:13 PM EDT
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/collator_asort.phpt b/ext/intl/tests/collator_asort.phpt
index a614ddc3f8..308f3a3ca3 100644
--- a/ext/intl/tests/collator_asort.phpt
+++ b/ext/intl/tests/collator_asort.phpt
@@ -2,6 +2,7 @@
asort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_compare.phpt b/ext/intl/tests/collator_compare.phpt
index f10b5708f4..7c07204b70 100644
--- a/ext/intl/tests/collator_compare.phpt
+++ b/ext/intl/tests/collator_compare.phpt
@@ -2,6 +2,7 @@
compare()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_sort_key.phpt b/ext/intl/tests/collator_get_sort_key.phpt
index a9c4d71348..58240d426c 100644
--- a/ext/intl/tests/collator_get_sort_key.phpt
+++ b/ext/intl/tests/collator_get_sort_key.phpt
@@ -3,6 +3,8 @@ collator_get_sort_key()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
+<?php /* XXX Obviously it fails somewhere between >= 4.8 and < 51.2 */
+if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
@@ -95,4 +97,4 @@ key: 5c0a161801070107
source: жжж
key: 5c3a3a3a01070107
source: эюя
-key: 5d3b3f4501070107 \ No newline at end of file
+key: 5d3b3f4501070107
diff --git a/ext/intl/tests/collator_sort.phpt b/ext/intl/tests/collator_sort.phpt
index 5cefe2fd7c..e16eeea1e8 100644
--- a/ext/intl/tests/collator_sort.phpt
+++ b/ext/intl/tests/collator_sort.phpt
@@ -2,6 +2,7 @@
sort()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_sort_with_sort_keys.phpt b/ext/intl/tests/collator_sort_with_sort_keys.phpt
index 2f489d745c..8be9c97789 100644
--- a/ext/intl/tests/collator_sort_with_sort_keys.phpt
+++ b/ext/intl/tests/collator_sort_with_sort_keys.phpt
@@ -2,6 +2,7 @@
sort_with_sort_keys()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/dateformat_calendars.phpt b/ext/intl/tests/dateformat_calendars.phpt
index 6af02e51c1..2239af28df 100644
--- a/ext/intl/tests/dateformat_calendars.phpt
+++ b/ext/intl/tests/dateformat_calendars.phpt
@@ -4,8 +4,8 @@ IntlDateFormatter, calendars and time zone
date.timezone=Atlantic/Azores
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_create_cal_arg.phpt b/ext/intl/tests/dateformat_create_cal_arg.phpt
index 53fb084af9..a8f351247b 100644
--- a/ext/intl/tests/dateformat_create_cal_arg.phpt
+++ b/ext/intl/tests/dateformat_create_cal_arg.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter: several forms of the calendar arg
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt
index 8664eea319..c3f6c297d9 100644
--- a/ext/intl/tests/dateformat_format.phpt
+++ b/ext/intl/tests/dateformat_format.phpt
@@ -2,6 +2,7 @@
datefmt_format_code()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/dateformat_formatObject_calendar.phpt b/ext/intl/tests/dateformat_formatObject_calendar.phpt
index 0c61e4f2d0..d3ab6260ff 100644
--- a/ext/intl/tests/dateformat_formatObject_calendar.phpt
+++ b/ext/intl/tests/dateformat_formatObject_calendar.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter::formatObject(): IntlCalendar tests
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_formatObject_datetime.phpt b/ext/intl/tests/dateformat_formatObject_datetime.phpt
index 6427ad5a98..d9ddb0e644 100644
--- a/ext/intl/tests/dateformat_formatObject_datetime.phpt
+++ b/ext/intl/tests/dateformat_formatObject_datetime.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter::formatObject(): DateTime tests
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled') ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_format_parse.phpt b/ext/intl/tests/dateformat_format_parse.phpt
index 6bd3d8a8ff..dfb479e937 100644
--- a/ext/intl/tests/dateformat_format_parse.phpt
+++ b/ext/intl/tests/dateformat_format_parse.phpt
@@ -2,6 +2,7 @@
datefmt_format_code() and datefmt_parse_code()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/dateformat_get_set_calendar.phpt b/ext/intl/tests/dateformat_get_set_calendar.phpt
index dbb3e6cd23..f91fe5c775 100644
--- a/ext/intl/tests/dateformat_get_set_calendar.phpt
+++ b/ext/intl/tests/dateformat_get_set_calendar.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_get_set_timezone.phpt b/ext/intl/tests/dateformat_get_set_timezone.phpt
index 41aa35b9cf..2a7ffa6c73 100644
--- a/ext/intl/tests/dateformat_get_set_timezone.phpt
+++ b/ext/intl/tests/dateformat_get_set_timezone.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter: get/setTimeZone()
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt
index ce9b89d1fd..a1ee440e71 100644
--- a/ext/intl/tests/dateformat_set_timezone_id2.phpt
+++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt
@@ -5,6 +5,7 @@ date.timezone=Atlantic/Azores
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/dateformat_timezone_arg_variations.phpt b/ext/intl/tests/dateformat_timezone_arg_variations.phpt
index ccfb5e1964..9fbb145c72 100644
--- a/ext/intl/tests/dateformat_timezone_arg_variations.phpt
+++ b/ext/intl/tests/dateformat_timezone_arg_variations.phpt
@@ -2,8 +2,8 @@
IntlDateFormatter: several forms of the timezone arg
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/formatter_get_locale.phpt b/ext/intl/tests/formatter_get_locale.phpt
index 3d4fb2ae4e..7474eabbba 100644
--- a/ext/intl/tests/formatter_get_locale.phpt
+++ b/ext/intl/tests/formatter_get_locale.phpt
@@ -2,6 +2,7 @@
numfmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_filter_matches2.phpt b/ext/intl/tests/locale_filter_matches2.phpt
index 37f9e5a377..12d247dc6b 100644
--- a/ext/intl/tests/locale_filter_matches2.phpt
+++ b/ext/intl/tests/locale_filter_matches2.phpt
@@ -1,8 +1,9 @@
--TEST--
-locale_filter_matches.phpt() icu >= 4.8
+locale_filter_matches.phpt() icu >= 4.8 && icu < 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_name2.phpt b/ext/intl/tests/locale_get_display_name2.phpt
index 40ccc0c2c5..bd8cb50cd5 100644
--- a/ext/intl/tests/locale_get_display_name2.phpt
+++ b/ext/intl/tests/locale_get_display_name2.phpt
@@ -1,8 +1,9 @@
--TEST--
-locale_get_display_name() icu >= 4.8
+locale_get_display_name() icu >= 4.8 && icu < 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_region2.phpt b/ext/intl/tests/locale_get_display_region2.phpt
index f1b584188a..1d7354bd1b 100644
--- a/ext/intl/tests/locale_get_display_region2.phpt
+++ b/ext/intl/tests/locale_get_display_region2.phpt
@@ -1,8 +1,9 @@
--TEST--
-locale_get_display_region() icu >= 4.8
+locale_get_display_region() icu >= 4.8 && icu < 51.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_lookup.phpt b/ext/intl/tests/locale_lookup.phpt
index f0affafa6f..df5204f07d 100644
--- a/ext/intl/tests/locale_lookup.phpt
+++ b/ext/intl/tests/locale_lookup.phpt
@@ -2,6 +2,7 @@
locale_lookup.phpt()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_format_intlcalendar.phpt b/ext/intl/tests/msgfmt_format_intlcalendar.phpt
index 6ae78a9140..a6bff2ecdd 100644
--- a/ext/intl/tests/msgfmt_format_intlcalendar.phpt
+++ b/ext/intl/tests/msgfmt_format_intlcalendar.phpt
@@ -2,8 +2,8 @@
MessageFormat accepts IntlCalendar args
--SKIPIF--
<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -27,4 +27,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
==DONE==
--EXPECT--
Quinta-feira, 17 de Maio de 2012 5:35:36 p.m. WEST
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
index 17fab6d630..bbbc1b1e91 100644
--- a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
+++ b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
@@ -3,11 +3,9 @@ ResourceBundle constructor bundle accepts NULL for first two arguments
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip ICU >= 4.8 only');
+<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '4.8') < 0) die('skip ICU >= 4.8 only'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
index 4ee30aee12..8f60f29040 100644
--- a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
@@ -1,11 +1,9 @@
--TEST--
-IntlTimeZone::getDisplayName(): type parameter (ICU >= 49)
+IntlTimeZone::getDisplayName(): type parameter (ICU >= 49 && ICU < 51.2)
--SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
+<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU 49+'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -35,4 +33,4 @@ string(5) "+0000"
string(3) "GMT"
string(3) "GMT"
string(22) "Portugal Time (Lisbon)"
-==DONE== \ No newline at end of file
+==DONE==