]> 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 22:29:14 +0000 (22:29 +0000)
committerandy wharmby <wharmby@php.net>
Tue, 13 Jan 2009 22:29:14 +0000 (22:29 +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 5f57ad6f843281bbb182c2dd18291738a143a913..6f7d43275991785519ab9568dc15a85a6ed7a120 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 83699c9b387962045e3112486c62594e9857de2e..2f1539a86e49beb9c34502c94b36b7a130e3ee0a 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 4e3f49e73c086099ca12112a5fbca33c5dd17081..cdf86356801aa6efbb7e96610a0a1dc1b1bf99b3 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 4c0aa71e5576f5861c3551455dd4fb0b2ccc0c4d..2f78ae88ab7659dc0eebd64575e28c9e8f2db7e0 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 94844d3c501fb43537481e088229ec231460207d..9f294b75111df94bd669cde016830e5c62f3b11f 100644 (file)
@@ -1,7 +1,5 @@
 --TEST--
 Basic test for date_sunrise and date_sunset based on example in PHP manual
---INI--
-date.timezone=UTC
 --FILE--
 <?php
 
@@ -14,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";