com php-src: Fix two date tests: ext/date/tests/bug67118.phpt ext/date/tests/bug67118_2.phpt
| From: | Nikita Popov | Date: | Fri, 03 Oct 2014 20:02:02 +0000 |
| Subject: | com php-src: Fix two date tests: ext/date/tests/bug67118.phpt ext/date/tests/bug67118_2.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82084@lists.php.net to get a copy of this message | ||
Commit: 4e33f40445bb6a797a05a5dc55394bc5cfcd2bd6
Author: Nikita Popov <nikic@php.net> Fri, 3 Oct 2014 21:49:44 +0200
Parents: 5831cca9576f4e0d4daed75a9915d436dfc5f4e5
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e33f40445bb6a797a05a5dc55394bc5cfcd2bd6
Log:
Fix two date tests
New behavior seems much more reasonable - nothing should be able
to touch the $this value like that.
Changed paths:
M ext/date/tests/bug67118.phpt
M ext/date/tests/bug67118_2.phpt
Diff:
diff --git a/ext/date/tests/bug67118.phpt b/ext/date/tests/bug67118.phpt
index 19b5914..3321428 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 368d4d9..9b6f545 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