From edb4679223a0c91a47f013c84f36966c49c5ad88 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 21 Sep 2014 19:48:25 +0000 Subject: [PATCH 1/2] Adapt var_dump test new php versions. Newer versions of PHP in 5.4 and 5.5 line add micro seconds precision to datetime representations. This adds a regular expression to ignore the .000000 suffix. --- tests/var_dump.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/var_dump.phpt b/tests/var_dump.phpt index 7adad82..9ce0896 100644 --- a/tests/var_dump.phpt +++ b/tests/var_dump.phpt @@ -88,7 +88,7 @@ array(11) { ["date"]=> object(DateTime)#%d (3) { ["date"]=> - string(19) "1976-09-27 09:00:00" + string(%d) "1976-09-27 09:00:00%r(\.0+)?%r" ["timezone_type"]=> int(3) ["timezone"]=> @@ -199,7 +199,7 @@ array (11) { function () { [native code] } } ["$date"] => - string(19) "1976-09-27 09:00:00" + string(%d) "1976-09-27 09:00:00%r(\.0+)?%r" ["$timezone_type"] => int(3) ["$timezone"] => From 5a78a76d41a982f75686e22e19498026b34b0524 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sun, 21 Sep 2014 20:34:10 +0000 Subject: [PATCH 2/2] Adapt unwind tests for PHP 5.6 style error messages PHP 5.6 has more detailed error messages, i.e. it says "on null" instead of "on a non-object". Replaced this particular part by a %s match to match both possibilities so the test suite passes on PHP 5.6 as well as older versions. --- tests/fatal_error_no_uninstall_inner_frame.phpt | 2 +- tests/fatal_error_recursive.phpt | 2 +- tests/fatal_error_rethrow.phpt | 2 +- tests/fatal_error_uninstall_in_first_frame.phpt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fatal_error_no_uninstall_inner_frame.phpt b/tests/fatal_error_no_uninstall_inner_frame.phpt index 30d388b..a7ea4ac 100644 --- a/tests/fatal_error_no_uninstall_inner_frame.phpt +++ b/tests/fatal_error_no_uninstall_inner_frame.phpt @@ -27,4 +27,4 @@ $js->executeString("PHP.foo();"); --EXPECTF-- nothing. -Fatal error: Call to a member function foo() on a non-object in %s/fatal_error_no_uninstall_inner_frame.php on line 15 \ No newline at end of file +Fatal error: Call to a member function foo() on %s in %s/fatal_error_no_uninstall_inner_frame.php on line 15 diff --git a/tests/fatal_error_recursive.phpt b/tests/fatal_error_recursive.phpt index 0a9178e..a6c83e4 100644 --- a/tests/fatal_error_recursive.phpt +++ b/tests/fatal_error_recursive.phpt @@ -35,4 +35,4 @@ $js->executeString("PHP.nofail(); PHP.foo();"); foo foo -Fatal error: Call to a member function bar() on a non-object in %s/fatal_error_recursive.php on line 7 \ No newline at end of file +Fatal error: Call to a member function bar() on %s in %s/fatal_error_recursive.php on line 7 diff --git a/tests/fatal_error_rethrow.phpt b/tests/fatal_error_rethrow.phpt index 5c56b5c..a25a1be 100644 --- a/tests/fatal_error_rethrow.phpt +++ b/tests/fatal_error_rethrow.phpt @@ -23,4 +23,4 @@ $js->executeString($script); ?> ===EOF=== --EXPECTF-- -Fatal error: Call to a member function bar() on a non-object in %s/fatal_error_rethrow.php on line 7 \ No newline at end of file +Fatal error: Call to a member function bar() on %s in %s/fatal_error_rethrow.php on line 7 diff --git a/tests/fatal_error_uninstall_in_first_frame.phpt b/tests/fatal_error_uninstall_in_first_frame.phpt index 31ae497..6bce47b 100644 --- a/tests/fatal_error_uninstall_in_first_frame.phpt +++ b/tests/fatal_error_uninstall_in_first_frame.phpt @@ -29,4 +29,4 @@ $bar->foo(); --EXPECTF-- nothing. -Fatal error: Call to a member function foo() on a non-object in %s/fatal_error_uninstall_in_first_frame.php on line 20 \ No newline at end of file +Fatal error: Call to a member function foo() on %s in %s/fatal_error_uninstall_in_first_frame.php on line 20