com php-src: Add tests with arrays as parameters: Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
Zend/tests/methods-on-non-objects-nested-calls-new.phpt Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
Zend/tests/methods-on-non-objects-nested-calls-static.phpt Zend/tests/methods-on-non-objects-nested-calls.phpt
| From: | Tjerk Anne Meesters | Date: | Sun, 06 Jul 2014 14:40:21 +0000 |
| Subject: | com php-src: Add tests with arrays as parameters: Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt Zend/tests/methods-on-non-objects-nested-calls-new.phpt Zend/tests/methods-on-non-objects-nested-calls-ns.phpt Zend/tests/methods-on-non-objects-nested-calls-static.phpt Zend/tests/methods-on-non-objects-nested-calls.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82134@lists.php.net to get a copy of this message | ||
Commit: e0d51d1cf00d43c57104764b620bb9219889a86d
Author: Timm Friebe <thekid@thekid.de> Sun, 6 Jul 2014 16:40:21 +0200
Parents: 7e2e4ebc69ac317ba7e4b9ae99c0ce382aea3944
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e0d51d1cf00d43c57104764b620bb9219889a86d
Log:
Add tests with arrays as parameters
Changed paths:
M Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
M Zend/tests/methods-on-non-objects-nested-calls-new.phpt
M Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
M Zend/tests/methods-on-non-objects-nested-calls-static.phpt
M Zend/tests/methods-on-non-objects-nested-calls.phpt
Diff:
diff --git a/Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
b/Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
index 56819e0..267104f 100755
--- a/Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls-dyn.phpt
@@ -21,6 +21,8 @@ var_dump($x->method($lambda()));
$func= 'nested';
var_dump($x->method($func()));
+var_dump($x->method(call_user_func('nested')));
+
echo "Alive\n";
?>
--EXPECTF--
@@ -30,4 +32,6 @@ Called #2
NULL
Called #3
NULL
+Called #4
+NULL
Alive
diff --git a/Zend/tests/methods-on-non-objects-nested-calls-new.phpt
b/Zend/tests/methods-on-non-objects-nested-calls-new.phpt
index 013c979..d8e3dd2 100755
--- a/Zend/tests/methods-on-non-objects-nested-calls-new.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls-new.phpt
@@ -16,6 +16,7 @@ var_dump($x->method(new Nesting(new Nesting())));
var_dump($x->method(new Nesting($x->nested())));
var_dump($x->method(new Nesting($x->nested(new Nesting()))));
var_dump($x->method($x->nested(new Nesting($x->deep()))));
+var_dump($x->method([new Nesting()]));
echo "Alive\n";
?>
--EXPECTF--
@@ -31,4 +32,6 @@ Called #5
NULL
Called #6
NULL
+Called #7
+NULL
Alive
diff --git a/Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
b/Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
index fdf9677..b16f579 100755
--- a/Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls-ns.phpt
@@ -13,6 +13,7 @@ set_error_handler(function($code, $message) {
$x= null;
var_dump($x->method(strlen('Test')));
var_dump($x->method(strlen('Test'), strlen('Test')));
+var_dump($x->method([strlen('Test')]));
echo "Alive\n";
?>
--EXPECTF--
@@ -20,4 +21,6 @@ Called #1
NULL
Called #2
NULL
+Called #3
+NULL
Alive
diff --git a/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
b/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
index bb5768e..64972ee 100755
--- a/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls-static.phpt
@@ -18,6 +18,7 @@ $method= 'nested';
var_dump($x->method(Nesting::nested()));
var_dump($x->method($class::nested()));
var_dump($x->method($class::{$method}()));
+var_dump($x->method([Nesting::nested()]));
echo "Alive\n";
?>
--EXPECTF--
@@ -27,4 +28,6 @@ Called #2
NULL
Called #3
NULL
+Called #4
+NULL
Alive
diff --git a/Zend/tests/methods-on-non-objects-nested-calls.phpt
b/Zend/tests/methods-on-non-objects-nested-calls.phpt
index e1fee51..b25aeaf 100644
--- a/Zend/tests/methods-on-non-objects-nested-calls.phpt
+++ b/Zend/tests/methods-on-non-objects-nested-calls.phpt
@@ -20,6 +20,7 @@ var_dump($x->method($x->nested(nested())));
var_dump($x->method($x->nested($x->deep())));
var_dump($x->method($x->nested(nested($x->deep()))));
var_dump($x->method(nested(nested($x->nested()))));
+var_dump($x->method([nested()]));
echo "Alive\n";
?>
--EXPECTF--
@@ -41,4 +42,6 @@ Called #8
NULL
Called #9
NULL
+Called #10
+NULL
Alive