]> granicus.if.org Git - php/commitdiff
- Fixed two more test cases.
authorDerick Rethans <derick@php.net>
Sun, 28 Nov 2010 16:27:49 +0000 (16:27 +0000)
committerDerick Rethans <derick@php.net>
Sun, 28 Nov 2010 16:27:49 +0000 (16:27 +0000)
ext/date/tests/DateTime_modify_variation1.phpt
ext/date/tests/date_modify_variation2.phpt

index d1c8ed46f99f54aa1ee13d8fbba87824da747bd1..e4d9067de093aad8d1ab062b051dd9962bf62bbe 100644 (file)
@@ -111,44 +111,24 @@ fclose( $file_handle );
 *** Testing DateTime::modify() : usage variation -  unexpected values to first argument $modify***
 
 -- int 0 --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- int 1 --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- int 12345 --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- int -12345 --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- float 10.5 --
 object(DateTime)#3 (3) {
@@ -161,14 +141,9 @@ object(DateTime)#3 (3) {
 }
 
 -- float -10.5 --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- float .5 --
 object(DateTime)#3 (3) {
@@ -182,181 +157,106 @@ object(DateTime)#3 (3) {
 
 -- empty array --
 
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 
 -- int indexed array --
 
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 
 -- associative array --
 
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 
 -- nested arrays --
 
-Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 
 -- uppercase NULL --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- lowercase null --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- lowercase true --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- lowercase false --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- uppercase TRUE --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- uppercase FALSE --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- empty string DQ --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- empty string SQ --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- string DQ --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- string SQ --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- mixed case string --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- heredoc --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- instance of classWithToString --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- instance of classWithoutToString --
 
-Warning: DateTime::modify() expects parameter 1 to be string, object given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 
 -- undefined var --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- unset var --
-object(DateTime)#3 (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
+bool(false)
 
 -- resource --
 
-Warning: DateTime::modify() expects parameter 1 to be string, resource given in %s on line %d
+Warning: DateTime::modify() expects parameter 1 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
 bool(false)
 ===DONE===
index 9689265f63645f35e377ff795c50fdf1d3498846..8dc563e25c1db4de42907f3e00f4a64470803fdb 100644 (file)
@@ -111,44 +111,24 @@ fclose( $file_handle );
 *** Testing date_modify() : usage variation -  unexpected values to second argument $format***
 
 -- int 0 --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- int 1 --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- int 12345 --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- int -12345 --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- float 10.5 --
 object(DateTime)#%d (3) {
@@ -161,14 +141,9 @@ object(DateTime)#%d (3) {
 }
 
 -- float -10.5 --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- float .5 --
 object(DateTime)#%d (3) {
@@ -182,181 +157,106 @@ object(DateTime)#%d (3) {
 
 -- empty array --
 
-Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 
 -- int indexed array --
 
-Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 
 -- associative array --
 
-Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 
 -- nested arrays --
 
-Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 
 -- uppercase NULL --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- lowercase null --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- lowercase true --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- lowercase false --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- uppercase TRUE --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- uppercase FALSE --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- empty string DQ --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- empty string SQ --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- string DQ --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- string SQ --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- mixed case string --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- heredoc --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- instance of classWithToString --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- instance of classWithoutToString --
 
-Warning: date_modify() expects parameter 2 to be string, object given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 
 -- undefined var --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- unset var --
-object(DateTime)#%d (3) {
-  ["date"]=>
-  string(19) "2009-01-31 14:28:41"
-  ["timezone_type"]=>
-  int(3)
-  ["timezone"]=>
-  string(13) "Europe/London"
-}
+
+Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
+bool(false)
 
 -- resource --
 
-Warning: date_modify() expects parameter 2 to be string, resource given in %s on line %d
+Warning: date_modify() expects parameter 2 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
 bool(false)
 ===DONE===