From: Felipe Pena Date: Tue, 12 May 2009 19:46:58 +0000 (+0000) Subject: - Fixed tests on Windows X-Git-Tag: php-5.3.0RC3~280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e753493c97d869c8ba364fd69042e232569321da;p=php - Fixed tests on Windows --- diff --git a/ext/date/tests/002.phpt b/ext/date/tests/002.phpt index 7384b74244..92d0d5f105 100644 --- a/ext/date/tests/002.phpt +++ b/ext/date/tests/002.phpt @@ -32,16 +32,16 @@ if (!@putenv("TZ=EST5") || getenv("TZ") != 'EST5') { ); echo "*** GMT0\n"; - putenv ("TZ=GMT0"); + date_default_timezone_set("GMT0"); foreach ($dates as $date) { echo date ("Y-m-d H:i:s\n", strtotime ($date)); } echo "*** US/Eastern\n"; - putenv("TZ=US/Eastern"); + date_default_timezone_set("US/Eastern"); if( date("T") == "GMT" ) { // POSIX style - putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0"); + date_default_timezone_set("EST5EDT4,M4.1.0,M10.5.0"); } foreach ($dates as $date) { diff --git a/ext/date/tests/009_win32.phpt b/ext/date/tests/009_win32.phpt index 6121f625b4..cbdc8b7c0a 100644 --- a/ext/date/tests/009_win32.phpt +++ b/ext/date/tests/009_win32.phpt @@ -34,17 +34,17 @@ var_dump(gmstrftime("blah", $t)); echo "Done\n"; ?> --EXPECTF-- -Warning: strftime() expects at least 1 parameter, 0 given in C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php on line 5 +Warning: strftime() expects at least 1 parameter, 0 given in %s on line %d bool(false) bool(false) -string(147) "Tue Tuesday Jun June 06/27/06 00:00:00 27 00 12 178 06 00 AM 00 26 26 2 06/27/06 00:00:00 06 2006 W. Europe Daylight Time W. Europe Daylight Time %" +string(%d) "Tue Tuesday Jun June 06/27/06 00:00:00 27 00 12 178 06 00 AM 00 26 26 2 06/27/06 00:00:00 06 2006 %s" string(5) "%q %a" string(4) "blah" -Warning: gmstrftime() expects at least 1 parameter, 0 given in C:\Users\pierre\Documents\php-sdk\vc9\x86\php_5_3\ext\date\tests\009_win32.php on line 15 +Warning: gmstrftime() expects at least 1 parameter, 0 given in %s on line %d bool(false) bool(false) -string(146) "Mon Monday Jun June 06/26/06 21:00:00 26 21 09 177 06 00 PM 00 26 26 1 06/26/06 21:00:00 06 2006 W. Europe Standard Time W. Europe Standard Time %" +string(%d) "Mon Monday Jun June 06/26/06 21:00:00 26 21 09 177 06 00 PM 00 26 26 1 06/26/06 21:00:00 06 2006 %s" string(5) "%q %a" string(4) "blah" Done diff --git a/ext/date/tests/bug13142.phpt b/ext/date/tests/bug13142.phpt index 5e54263c54..60fc7e7f6e 100644 --- a/ext/date/tests/bug13142.phpt +++ b/ext/date/tests/bug13142.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #13142 (strtotime handling of "M d H:i:s Y" format) +--INI-- +date.timezone=US/Eastern --SKIPIF-- --FILE-- diff --git a/ext/date/tests/bug17988.phpt b/ext/date/tests/bug17988.phpt index 259fa7dc2e..e758b16aed 100644 --- a/ext/date/tests/bug17988.phpt +++ b/ext/date/tests/bug17988.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #17988 (strtotime handling of postgresql timestamps) +--INI-- +date.timezone=GMT --FILE-- --EXPECT-- diff --git a/ext/date/tests/bug21966.phpt b/ext/date/tests/bug21966.phpt index 31f592fa98..353e7e5985 100644 --- a/ext/date/tests/bug21966.phpt +++ b/ext/date/tests/bug21966.phpt @@ -1,9 +1,9 @@ --TEST-- Bug #21966 (date() or mktime() returning bad value for mktime month param of '2') +--INI-- +date.timezone=Europe/London --FILE-- diff --git a/ext/date/tests/bug26694.phpt b/ext/date/tests/bug26694.phpt index a709d1666c..939b04c136 100644 --- a/ext/date/tests/bug26694.phpt +++ b/ext/date/tests/bug26694.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #26694 (strtotime() request for "Sun, 21 Dec 2003 20:38:33 +0000 GMT") +--INI-- +date.timezone=GMT --FILE-- --EXPECT-- diff --git a/ext/date/tests/bug27719.phpt b/ext/date/tests/bug27719.phpt index 6f65bfb85e..88c17704e5 100644 --- a/ext/date/tests/bug27719.phpt +++ b/ext/date/tests/bug27719.phpt @@ -1,10 +1,10 @@ --TEST-- Bug #27719 (mktime returns incorrect timestamp for dst days) --INI-- +date.timezone=EST error_reporting=2047 --FILE-- diff --git a/ext/date/tests/bug29150.phpt b/ext/date/tests/bug29150.phpt index 274584d050..d91d68d919 100644 --- a/ext/date/tests/bug29150.phpt +++ b/ext/date/tests/bug29150.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #29150 (Roman number format for months) +--INI-- +date.timezone=GMT --FILE-- --EXPECT-- diff --git a/ext/date/tests/bug30532.phpt b/ext/date/tests/bug30532.phpt index faee0b316f..6794b9dc7a 100644 --- a/ext/date/tests/bug30532.phpt +++ b/ext/date/tests/bug30532.phpt @@ -1,8 +1,10 @@ --TEST-- Bug #30532 (strtotime - crossing daylight savings time) +--INI-- +date.timezone=America/New_York --FILE--