Permalink
Browse files

Fix or skip failing tests on 5.2

  • Loading branch information...
cataphract committed Jul 24, 2012
1 parent 079296f commit de7a1f61ba98ea99daa9d3d5e780c7a7dee892cc
View
@@ -449,7 +449,6 @@
<file role="test" name="formatter_get_error.phpt"/>
<file role="test" name="formatter_get_locale.phpt"/>
<file role="test" name="formatter_get_set_attribute.phpt"/>
- <file role="test" name="formatter_get_set_attribute2.phpt"/>
<file role="test" name="formatter_get_set_pattern.phpt"/>
<file role="test" name="formatter_get_set_symbol.phpt"/>
<file role="test" name="formatter_get_set_symbol2.phpt"/>
@@ -6,6 +6,8 @@ if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
die('skip for ICU 4.8+');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -6,6 +6,8 @@ if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
die('skip for ICU 4.8+');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -81,4 +83,4 @@ IntlTimeZone Object
[currentOffset] => %d
)
pt
-==DONE==
+==DONE==
@@ -4,6 +4,8 @@ IntlCalendar::fromDateTime(): errors
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -6,6 +6,8 @@ if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
die('skip for ICU 4.8+');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -31,4 +33,4 @@ IntlTimeZone Object
[rawOffset] => 60000
[currentOffset] => 60000
)
-==DONE==
+==DONE==
@@ -4,6 +4,8 @@ IntlCalendar::setTimeZone(): valid time zones for DateTime but not ICU
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
+if(!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -16,7 +16,7 @@ datefmt_format_code() (5.2)
function ut_main()
{
- $timezone = 'GMT-10';
+ $timezone = 'GMT-10:00';
$locale_arr = array (
'en_US'
@@ -371,24 +371,24 @@ Formatted DateTime is : 20001230 05:04 PM
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
-Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
+Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
@@ -45,7 +45,7 @@ bool(false)
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: bad IntlCalendar instance: not initialized properly in %s on line %d
bool(false)
-Warning: DateTime::getTimestamp(): The DateTime object has not been correctly initialized by its constructor in %s on line %d
+Warning: DateTime::%s: The DateTime object has not been correctly initialized by its constructor in %s on line %d
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: error calling ::getTimeStamp() on the object in %s on line %d
bool(false)
@@ -14,5 +14,5 @@ $df->setTimeZoneId('Europe/Madrid');
==DONE==
--EXPECTF--
-Deprecated: IntlDateFormatter::setTimeZoneId(): Use datefmt_set_timezone() instead, which also accepts a plain time zone identifier and for which this function is now an alias in %s on line %d
+%s: IntlDateFormatter::setTimeZoneId(): Use datefmt_set_timezone() instead, which also accepts a plain time zone identifier and for which this function is now an alias in %s on line %d
==DONE==
@@ -9,7 +9,10 @@ date.timezone=Atlantic/Azores
<?php
ini_set("intl.error_level", E_WARNING);
-ini_set("error_reporting", ~E_DEPRECATED);
+if (defined('E_DEPRECATED'))
+ ini_set("error_reporting", ~E_DEPRECATED);
+else
+ ini_set("error_reporting", ~E_STRICT);
/*
* Test for the datefmt_set_timezone_id function
@@ -6,6 +6,8 @@ if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
die('skip for ICU 4.8+');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -30,4 +32,4 @@ IntlTimeZone Object
[rawOffset] => 3600000
[currentOffset] => 3600000
)
-==DONE==
+==DONE==
@@ -6,6 +6,8 @@ if (!extension_loaded('intl'))
die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '49') < 0)
die('skip for ICU 49+');
+if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
+ die("skip for PHP 5.3+");
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -32,4 +34,4 @@ IntlTimeZone Object
[rawOffset] => 0
[currentOffset] => 0
)
-==DONE==
+==DONE==

0 comments on commit de7a1f6

Please sign in to comment.