diff options
author | andy wharmby <wharmby@php.net> | 2009-01-13 23:08:03 +0000 |
---|---|---|
committer | andy wharmby <wharmby@php.net> | 2009-01-13 23:08:03 +0000 |
commit | f52ad63dfbc2c4cf3c6a87a42e0958254cef7806 (patch) | |
tree | 18a8587efc0107fd2c58eee1bfd3af7ab5ecd7b8 | |
parent | 4093573e5c77bd1e05c9bdd9edc90b94d7f735c4 (diff) | |
download | php-git-f52ad63dfbc2c4cf3c6a87a42e0958254cef7806.tar.gz |
Fix new date tests. Tested on Windows, Linux and Linux 64 bit
-rw-r--r-- | ext/date/tests/date_default_timezone_get_error.phpt | 4 | ||||
-rw-r--r-- | ext/date/tests/date_default_timezone_set_error.phpt | 2 | ||||
-rw-r--r-- | ext/date/tests/date_sun_info_error.phpt | 2 | ||||
-rw-r--r-- | ext/date/tests/date_sun_info_variation1.phpt | 4 | ||||
-rw-r--r-- | ext/date/tests/date_sun_info_variation2.phpt | 5 | ||||
-rw-r--r-- | ext/date/tests/date_sun_info_variation3.phpt | 5 | ||||
-rw-r--r-- | ext/date/tests/date_sunrise_and_sunset_basic.phpt | 4 |
7 files changed, 12 insertions, 14 deletions
diff --git a/ext/date/tests/date_default_timezone_get_error.phpt b/ext/date/tests/date_default_timezone_get_error.phpt index 3a18a761d5..1d96d18cd7 100644 --- a/ext/date/tests/date_default_timezone_get_error.phpt +++ b/ext/date/tests/date_default_timezone_get_error.phpt @@ -1,13 +1,13 @@ --TEST-- Test date_default_timezone_get() function : error conditions ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : string date_default_timezone_get ( void ) * Description: Gets the default timezone used by all date/time functions in a script. * Source code: ext/standard/data/php_date.c */ + +date_default_timezone_set("UTC"); echo "*** Testing date_default_timezone_get() : error conditions ***\n"; diff --git a/ext/date/tests/date_default_timezone_set_error.phpt b/ext/date/tests/date_default_timezone_set_error.phpt index 870afe4ff4..15c6aa6fed 100644 --- a/ext/date/tests/date_default_timezone_set_error.phpt +++ b/ext/date/tests/date_default_timezone_set_error.phpt @@ -1,7 +1,5 @@ --TEST-- Test date_default_timezone_set() function : error variations ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : bool date_default_timezone_set ( string $timezone_identifier ) diff --git a/ext/date/tests/date_sun_info_error.phpt b/ext/date/tests/date_sun_info_error.phpt index f5665ee58c..8d572479f3 100644 --- a/ext/date/tests/date_sun_info_error.phpt +++ b/ext/date/tests/date_sun_info_error.phpt @@ -1,7 +1,5 @@ --TEST-- Test date_sun_info() function : error variations ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude ) diff --git a/ext/date/tests/date_sun_info_variation1.phpt b/ext/date/tests/date_sun_info_variation1.phpt index ddcaf8955b..382ba28cd9 100644 --- a/ext/date/tests/date_sun_info_variation1.phpt +++ b/ext/date/tests/date_sun_info_variation1.phpt @@ -1,13 +1,13 @@ --TEST-- Test date_sun_info() function : error variations - Pass unexpected values for time argument ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude ) * Description: Returns an array with information about sunset/sunrise and twilight begin/end. * Source code: ext/standard/data/php_date.c */ + +date_default_timezone_set("UTC"); echo "*** Testing date_sun_info() : usage variations ***\n"; diff --git a/ext/date/tests/date_sun_info_variation2.phpt b/ext/date/tests/date_sun_info_variation2.phpt index 16ad83ea03..55a782a78c 100644 --- a/ext/date/tests/date_sun_info_variation2.phpt +++ b/ext/date/tests/date_sun_info_variation2.phpt @@ -1,13 +1,14 @@ --TEST-- Test date_sun_info() function : error variations - PAss unexepcted valuesfor latitude argument ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude ) * Description: Returns an array with information about sunset/sunrise and twilight begin/end. * Source code: ext/standard/data/php_date.c */ + +// supress date() function strict msgs +error_reporting(E_ALL & ~E_STRICT); echo "*** Testing date_sun_info() : usage variations ***\n"; diff --git a/ext/date/tests/date_sun_info_variation3.phpt b/ext/date/tests/date_sun_info_variation3.phpt index 4f9d3b26a0..6a1dd77236 100644 --- a/ext/date/tests/date_sun_info_variation3.phpt +++ b/ext/date/tests/date_sun_info_variation3.phpt @@ -1,13 +1,14 @@ --TEST-- Test date_sun_info() function : usage variations - Pass unexpected values for longitude argument ---INI-- -date.timezone=UTC --FILE-- <?php /* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude ) * Description: Returns an array with information about sunset/sunrise and twilight begin/end. * Source code: ext/standard/data/php_date.c */ + +// supress date() function strict msgs +error_reporting(E_ALL & ~E_STRICT); echo "*** Testing date_sun_info() : usage variations ***\n"; diff --git a/ext/date/tests/date_sunrise_and_sunset_basic.phpt b/ext/date/tests/date_sunrise_and_sunset_basic.phpt index 37255217d4..9f294b7511 100644 --- a/ext/date/tests/date_sunrise_and_sunset_basic.phpt +++ b/ext/date/tests/date_sunrise_and_sunset_basic.phpt @@ -12,8 +12,8 @@ offset: +1 GMT echo "Basic test for date_sunrise() and date_sunset()\n"; -// supress date() function warning msgs -error_reporting(E_ALL & ~E_WARNING); +// supress date() function strict msgs +error_reporting(E_ALL & ~E_STRICT); echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n"; |