]> granicus.if.org Git - php/commitdiff
Fix two date tests
authorNikita Popov <nikic@php.net>
Fri, 3 Oct 2014 19:49:44 +0000 (21:49 +0200)
committerNikita Popov <nikic@php.net>
Fri, 3 Oct 2014 20:02:02 +0000 (22:02 +0200)
New behavior seems much more reasonable - nothing should be able
to touch the $this value like that.

ext/date/tests/bug67118.phpt
ext/date/tests/bug67118_2.phpt

index 19b5914aa3b767148216a19e16adc52b513b645b..332142856e42b707fd106fc165f9c294c52a30ef 100644 (file)
@@ -23,4 +23,5 @@ class mydt extends datetime
 new mydt("Funktionsansvarig rĂ„dgivning och juridik", "UTC");
 ?>
 --EXPECTF--
-Fatal error: Call to a member function format() on null in %sbug67118.php on line %d
+Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %s on line %d
+Bad date
index 368d4d9401caaef8146f62d5edcb23c22f89f440..9b6f5455258cb51ceb496ecb3ea7f811c571ebeb 100644 (file)
@@ -24,5 +24,12 @@ Done
 --EXPECTF--
 First try
 Second try
-NULL
-Done
\ No newline at end of file
+object(Foo)#1 (3) {
+  ["date"]=>
+  string(26) "2007-09-12 15:49:12.000000"
+  ["timezone_type"]=>
+  int(3)
+  ["timezone"]=>
+  string(3) "UTC"
+}
+Done