From: Nikita Popov Date: Fri, 3 Oct 2014 19:49:44 +0000 (+0200) Subject: Fix two date tests X-Git-Tag: PRE_PHP7_REMOVALS~89^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e33f40445bb6a797a05a5dc55394bc5cfcd2bd6;p=php Fix two date tests New behavior seems much more reasonable - nothing should be able to touch the $this value like that. --- diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt index 19b5914aa3..332142856e 100644 --- a/ext/date/tests/bug67118.phpt +++ b/ext/date/tests/bug67118.phpt @@ -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 diff --git a/ext/date/tests/bug67118_2.phpt b/ext/date/tests/bug67118_2.phpt index 368d4d9401..9b6f545525 100644 --- a/ext/date/tests/bug67118_2.phpt +++ b/ext/date/tests/bug67118_2.phpt @@ -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