]> granicus.if.org Git - php/commitdiff
Fix new date tests. Tested on Windows, Linux and Linux 64 bit
authorandy wharmby <wharmby@php.net>
Tue, 13 Jan 2009 23:08:03 +0000 (23:08 +0000)
committerandy wharmby <wharmby@php.net>
Tue, 13 Jan 2009 23:08:03 +0000 (23:08 +0000)
ext/date/tests/date_default_timezone_get_error.phpt
ext/date/tests/date_default_timezone_set_error.phpt
ext/date/tests/date_sun_info_error.phpt
ext/date/tests/date_sun_info_variation1.phpt
ext/date/tests/date_sun_info_variation2.phpt
ext/date/tests/date_sun_info_variation3.phpt
ext/date/tests/date_sunrise_and_sunset_basic.phpt

index 3a18a761d5eb52afee72bbb45f05292151a51be3..1d96d18cd7bf778ddc3337df958ecd3defaadf8c 100644 (file)
@@ -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";
 
index 870afe4ff48b536f3731abb62980b20582bbf994..15c6aa6fedc6da0b5a84d660a6eb8702dfde9335 100644 (file)
@@ -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 )
index f5665ee58cd926a162c3046da1e09f7e78b40c34..8d572479f30d9e30c8437c40468cb31d0953934a 100644 (file)
@@ -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   )
index ddcaf8955b154bb654b99c222a700c82c2374cdf..382ba28cd9cadc81d770852b18d5656bf4ba258a 100644 (file)
@@ -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";
 
index 16ad83ea03728ed93df9658f6b2cc354590d84c1..55a782a78cf227f029ccb8237225b48faa6888a6 100644 (file)
@@ -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";
 
index 4f9d3b26a05562900c2c4e1ae6aeab46684b338a..6a1dd772361407c8144505f80fbdeadc2d62fd95 100644 (file)
@@ -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";
 
index 37255217d427bf03e824305a8a493a5ce7a400a7..9f294b75111df94bd669cde016830e5c62f3b11f 100644 (file)
@@ -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";