stas                                     Mon, 24 Jan 2011 02:48:15 +0000

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

Log:
fix tests

Changed paths:
    U   
php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_construct_variation2.phpt
    U   php/php-src/branches/PHP_5_3/ext/date/tests/date_create_variation2.phpt
    D   php/php-src/branches/PHP_5_3/ext/date/tests/dateinterval_errors.phpt
    U   php/php-src/branches/PHP_5_3/ext/date/tests/gmstrftime_variation22.phpt
    U   php/php-src/branches/PHP_5_3/ext/date/tests/strftime_variation22.phpt
    U   php/php-src/trunk/ext/date/tests/DateTime_construct_variation2.phpt
    U   php/php-src/trunk/ext/date/tests/date_create_variation2.phpt
    D   php/php-src/trunk/ext/date/tests/dateinterval_errors.phpt
    U   php/php-src/trunk/ext/date/tests/gmstrftime_variation22.phpt
    U   php/php-src/trunk/ext/date/tests/strftime_variation22.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_construct_variation2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_construct_variation2.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_construct_variation2.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -114,7 +114,7 @@

 ?>
 ===DONE===
---EXPECT--
+--EXPECTF--
 *** Testing new DateTime() : usage variation -  unexpected values to second argument $timezone***

 -- int 0 --
@@ -151,10 +151,24 @@
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given

 -- uppercase NULL --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- lowercase null --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- lowercase true --
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, boolean given
@@ -193,10 +207,24 @@
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given

 -- undefined var --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- unset var --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- resource --
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, resource given

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/date_create_variation2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/date_create_variation2.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/date_create_variation2.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -166,15 +166,25 @@
 bool(false)

 -- uppercase NULL --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- lowercase null --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- lowercase true --

 Warning: date_create() expects parameter 2 to be DateTimeZone, boolean given in %s on line %d
@@ -236,15 +246,25 @@
 bool(false)

 -- undefined var --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- unset var --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- resource --

 Warning: date_create() expects parameter 2 to be DateTimeZone, resource given in %s on line %d

Deleted: php/php-src/branches/PHP_5_3/ext/date/tests/dateinterval_errors.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/dateinterval_errors.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/dateinterval_errors.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -1,13 +0,0 @@
---TEST--
-DateInterval: Getter and setter errors
---FILE--
-<?php
-$d = DateInterval::createFromDateString("");
-$d->y = 1984;
-var_dump($d->y);
-var_dump($d->asdf, $d->y);
-?>
---EXPECTF--
-int(1984)
-
-Fatal error: main(): Unknown property (asdf) in %sdateinterval_errors.php on line 5

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/gmstrftime_variation22.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/gmstrftime_variation22.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/gmstrftime_variation22.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -35,24 +35,24 @@

 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
-      var_dump( gmstrftime($value) );
+      var_dump( $value );
       var_dump( gmstrftime($value, $timestamp) );
 };

 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 *** Testing gmstrftime() : usage variation ***

 --Preferred date and time representation--
-string(%d) "%s %d %s %d %d:%d:%d %s GMT"
-string(31) "Fri 08 Aug 2008 08:08:08 AM GMT"
+string(2) "%c"
+string(24) "Fri Aug  8 08:08:08 2008"

 --Preferred date representation--
-string(%d) "%d/%d/%d"
+string(2) "%x"
 string(10) "08/08/2008"

 --Preferred time representation--
-string(%d) "%d:%d:%d %s"
-string(11) "08:08:08 AM"
+string(2) "%X"
+string(8) "08:08:08"
 ===DONE===

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/strftime_variation22.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/strftime_variation22.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/strftime_variation22.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -35,24 +35,24 @@

 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
-	  var_dump( strftime($value) );
+	  var_dump( $value );
 	  var_dump( strftime($value, $timestamp) );
 }

 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 *** Testing strftime() : usage variation ***

 --Preferred date and time representation--
-string(%d) "%s %d %s %d %d:%d:%d %s %s"
-string(31) "Fri 08 Aug 2008 08:08:08 AM IST"
+string(2) "%c"
+string(24) "Fri Aug  8 08:08:08 2008"

 --Preferred date representation--
-string(%d) "%d/%d/%d"
+string(2) "%x"
 string(10) "08/08/2008"

 --Preferred time representation--
-string(%d) "%d:%d:%d %s"
-string(11) "08:08:08 AM"
+string(2) "%X"
+string(8) "08:08:08"
 ===DONE===

Modified: php/php-src/trunk/ext/date/tests/DateTime_construct_variation2.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/DateTime_construct_variation2.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/trunk/ext/date/tests/DateTime_construct_variation2.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -114,7 +114,7 @@

 ?>
 ===DONE===
---EXPECT--
+--EXPECTF--
 *** Testing new DateTime() : usage variation -  unexpected values to second argument $timezone***

 -- int 0 --
@@ -151,10 +151,24 @@
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given

 -- uppercase NULL --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- lowercase null --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- lowercase true --
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, boolean given
@@ -193,10 +207,24 @@
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given

 -- undefined var --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- unset var --
-FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

 -- resource --
 FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, resource given

Modified: php/php-src/trunk/ext/date/tests/date_create_variation2.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/date_create_variation2.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/trunk/ext/date/tests/date_create_variation2.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -166,15 +166,25 @@
 bool(false)

 -- uppercase NULL --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- lowercase null --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- lowercase true --

 Warning: date_create() expects parameter 2 to be DateTimeZone, boolean given in %s on line %d
@@ -236,15 +246,25 @@
 bool(false)

 -- undefined var --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- unset var --
+object(DateTime)#%d (3) {
+  ["date"]=>
+  string(19) "2005-07-14 22:30:41"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(13) "Europe/London"
+}

-Warning: date_create() expects parameter 2 to be DateTimeZone, null given in %s on line %d
-bool(false)
-
 -- resource --

 Warning: date_create() expects parameter 2 to be DateTimeZone, resource given in %s on line %d

Deleted: php/php-src/trunk/ext/date/tests/dateinterval_errors.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/dateinterval_errors.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/trunk/ext/date/tests/dateinterval_errors.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -1,13 +0,0 @@
---TEST--
-DateInterval: Getter and setter errors
---FILE--
-<?php
-$d = DateInterval::createFromDateString("");
-$d->y = 1984;
-var_dump($d->y);
-var_dump($d->asdf, $d->y);
-?>
---EXPECTF--
-int(1984)
-
-Fatal error: main(): Unknown property (asdf) in %sdateinterval_errors.php on line 5

Modified: php/php-src/trunk/ext/date/tests/gmstrftime_variation22.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/gmstrftime_variation22.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/trunk/ext/date/tests/gmstrftime_variation22.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -35,24 +35,24 @@

 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
-      var_dump( gmstrftime($value) );
+      var_dump( $value );
       var_dump( gmstrftime($value, $timestamp) );
 };

 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 *** Testing gmstrftime() : usage variation ***

 --Preferred date and time representation--
-string(%d) "%s %d %s %d %d:%d:%d %s GMT"
-string(31) "Fri 08 Aug 2008 08:08:08 AM GMT"
+string(2) "%c"
+string(24) "Fri Aug  8 08:08:08 2008"

 --Preferred date representation--
-string(%d) "%d/%d/%d"
+string(2) "%x"
 string(10) "08/08/2008"

 --Preferred time representation--
-string(%d) "%d:%d:%d %s"
-string(11) "08:08:08 AM"
+string(2) "%X"
+string(8) "08:08:08"
 ===DONE===

Modified: php/php-src/trunk/ext/date/tests/strftime_variation22.phpt
===================================================================
--- php/php-src/trunk/ext/date/tests/strftime_variation22.phpt	2011-01-24 02:31:48 UTC (rev 307689)
+++ php/php-src/trunk/ext/date/tests/strftime_variation22.phpt	2011-01-24 02:48:15 UTC (rev 307690)
@@ -35,24 +35,24 @@

 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
-	  var_dump( strftime($value) );
+	  var_dump( $value );
 	  var_dump( strftime($value, $timestamp) );
 }

 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 *** Testing strftime() : usage variation ***

 --Preferred date and time representation--
-string(%d) "%s %d %s %d %d:%d:%d %s %s"
-string(31) "Fri 08 Aug 2008 08:08:08 AM IST"
+string(2) "%c"
+string(24) "Fri Aug  8 08:08:08 2008"

 --Preferred date representation--
-string(%d) "%d/%d/%d"
+string(2) "%x"
 string(10) "08/08/2008"

 --Preferred time representation--
-string(%d) "%d:%d:%d %s"
-string(11) "08:08:08 AM"
+string(2) "%X"
+string(8) "08:08:08"
 ===DONE===
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to