derick                                   Wed, 10 Feb 2010 16:16:18 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294853

Log:
- Fixed a few tests due to Unicode and the environment var support.

Changed paths:
    D   php/php-src/trunk/ext/date/tests/002.phpt
    U   php/php-src/trunk/ext/date/tests/bug50680.phpt
    U   php/php-src/trunk/ext/date/tests/date.phpt
    U   php/php-src/trunk/ext/date/tests/date_default_timezone_get-3.phpt
    U   php/php-src/trunk/ext/date/tests/date_sunrise_variation5.phpt
    U   php/php-src/trunk/ext/date/tests/date_sunset_variation5.phpt
    U   php/php-src/trunk/ext/date/tests/idate_variation7.phpt
    U   php/php-src/trunk/ext/date/tests/timezone-configuration.phpt

Deleted: php/php-src/trunk/ext/date/tests/002.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/002.phpt   2010-02-10 16:11:14 UTC (rev 
294852)
+++ php/php-src/trunk/ext/date/tests/002.phpt   2010-02-10 16:16:18 UTC (rev 
294853)
@@ -1,93 +0,0 @@
---TEST--
-strtotime() function
---SKIPIF--
-<?php
-if (!...@putenv("TZ=EST5") || getenv("TZ") != 'EST5') {
-       die("skip unable to change TZ enviroment variable\n");
-}
-?>
---FILE--
-<?php
-       $dates = array (
-               "1999-10-13",
-               "Oct 13  1999",
-               "2000-01-19",
-               "Jan 19  2000",
-               "2001-12-21",
-               "Dec 21  2001",
-               "2001-12-21 12:16",
-               "Dec 21 2001 12:16",
-               "Dec 21  12:16",
-           "2001-10-22 21:19:58",
-           "2001-10-22 21:19:58-02",
-           "2001-10-22 21:19:58-0213",
-           "2001-10-22 21:19:58+02",
-       "2001-10-22 21:19:58+0213",
-               "2001-10-22T21:20:58-03:40",
-               "2001-10-22T211958-2",
-               "20011022T211958+0213",
-               "20011022T21:20+0215",
-               "1997W011",
-               "2004W101T05:00+0",
-       );
-
-       echo "*** GMT0\n";
-       putenv ("TZ=GMT0");
-       foreach ($dates as $date) {
-           echo date ("Y-m-d H:i:s\n", strtotime ($date));
-       }
-
-       echo "*** US/Eastern\n";
-       putenv("TZ=US/Eastern");
-       if( date("T") == "GMT" ) {
-               // POSIX style
-               putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0");
-       }
-
-       foreach ($dates as $date) {
-           echo date ("Y-m-d H:i:s\n", strtotime ($date));
-       }
-?>
---EXPECTF--
-*** GMT0
-1999-10-13 00:00:00
-1999-10-13 00:00:00
-2000-01-19 00:00:00
-2000-01-19 00:00:00
-2001-12-21 00:00:00
-2001-12-21 00:00:00
-2001-12-21 12:16:00
-2001-12-21 12:16:00
-%d-12-21 12:16:00
-2001-10-22 21:19:58
-2001-10-22 23:19:58
-2001-10-22 23:32:58
-2001-10-22 19:19:58
-2001-10-22 19:06:58
-2001-10-23 01:00:58
-2001-10-22 23:19:58
-2001-10-22 19:06:58
-2001-10-22 19:05:00
-1996-12-30 00:00:00
-2004-03-01 05:00:00
-*** US/Eastern
-1999-10-13 00:00:00
-1999-10-13 00:00:00
-2000-01-19 00:00:00
-2000-01-19 00:00:00
-2001-12-21 00:00:00
-2001-12-21 00:00:00
-2001-12-21 12:16:00
-2001-12-21 12:16:00
-%d-12-21 12:16:00
-2001-10-22 21:19:58
-2001-10-22 19:19:58
-2001-10-22 19:32:58
-2001-10-22 15:19:58
-2001-10-22 15:06:58
-2001-10-22 21:00:58
-2001-10-22 19:19:58
-2001-10-22 15:06:58
-2001-10-22 15:05:00
-1996-12-30 00:00:00
-2004-03-01 00:00:00

Modified: php/php-src/trunk/ext/date/tests/bug50680.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/bug50680.phpt      2010-02-10 16:11:14 UTC 
(rev 294852)
+++ php/php-src/trunk/ext/date/tests/bug50680.phpt      2010-02-10 16:16:18 UTC 
(rev 294853)
@@ -6,4 +6,4 @@
 <?php
 var_dump(date("d", strtotime("March 1 eighth day 2009")));
 --EXPECT--
-string(2) "09"
+unicode(2) "09"

Modified: php/php-src/trunk/ext/date/tests/date.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/date.phpt  2010-02-10 16:11:14 UTC (rev 
294852)
+++ php/php-src/trunk/ext/date/tests/date.phpt  2010-02-10 16:16:18 UTC (rev 
294853)
@@ -3,13 +3,13 @@
 --FILE--
 <?php
 $tmp = "cr";
-putenv ("TZ=GMT0");
+date_default_timezone_set("GMT");

 for($a = 0;$a < strlen($tmp); $a++){
        echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";
 }

-putenv ("TZ=MET");
+date_default_timezone_set("CET");

 for($a = 0;$a < strlen($tmp); $a++){
        echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n";

Modified: php/php-src/trunk/ext/date/tests/date_default_timezone_get-3.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/date_default_timezone_get-3.phpt   
2010-02-10 16:11:14 UTC (rev 294852)
+++ php/php-src/trunk/ext/date/tests/date_default_timezone_get-3.phpt   
2010-02-10 16:16:18 UTC (rev 294853)
@@ -4,12 +4,8 @@
 date.timezone=
 --FILE--
 <?php
-       putenv('TZ=Europe/Rome');
-       echo date_default_timezone_get(), "\n";
-
        date_default_timezone_set("America/Chicago");
        echo date_default_timezone_get(), "\n";
 ?>
 --EXPECT--
-Europe/Rome
 America/Chicago

Modified: php/php-src/trunk/ext/date/tests/date_sunrise_variation5.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/date_sunrise_variation5.phpt       
2010-02-10 16:11:14 UTC (rev 294852)
+++ php/php-src/trunk/ext/date/tests/date_sunrise_variation5.phpt       
2010-02-10 16:16:18 UTC (rev 294853)
@@ -113,12 +113,12 @@
 bool(false)

 --int 12345--
-string(5) "09:51"
+unicode(5) "09:51"
 float(9.855%d)
 int(1218169278)

 --int -12345--
-string(5) "09:54"
+unicode(5) "09:54"
 float(9.9097820911118)
 int(1218169475)


Modified: php/php-src/trunk/ext/date/tests/date_sunset_variation5.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/date_sunset_variation5.phpt        
2010-02-10 16:11:14 UTC (rev 294852)
+++ php/php-src/trunk/ext/date/tests/date_sunset_variation5.phpt        
2010-02-10 16:16:18 UTC (rev 294853)
@@ -113,7 +113,7 @@
 bool(false)

 --int 12345--
-string(5) "19:20"
+unicode(5) "19:20"
 float(19.340%d)
 int(1218203424)


Modified: php/php-src/trunk/ext/date/tests/idate_variation7.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/idate_variation7.phpt      2010-02-10 
16:11:14 UTC (rev 294852)
+++ php/php-src/trunk/ext/date/tests/idate_variation7.phpt      2010-02-10 
16:16:18 UTC (rev 294853)
@@ -24,7 +24,7 @@
 *** Testing idate() : usage variation ***

 Warning: idate(): It is not safe to rely on the system's timezone settings.%s
-int(2009)
+int(20%d)

 Warning: idate(): It is not safe to rely on the system's timezone settings.%s
 int(2008)

Modified: php/php-src/trunk/ext/date/tests/timezone-configuration.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/timezone-configuration.phpt        
2010-02-10 16:11:14 UTC (rev 294852)
+++ php/php-src/trunk/ext/date/tests/timezone-configuration.phpt        
2010-02-10 16:16:18 UTC (rev 294853)
@@ -7,7 +7,7 @@
        date_default_timezone_set('Europe/Oslo');
        echo strtotime("2005-06-18 22:15:44"), "\n";

-       putenv('TZ=Europe/London');
+       date_default_timezone_set('Europe/London');
        echo strtotime("2005-06-18 22:15:44"), "\n";

        date_default_timezone_set('Europe/Oslo');

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to