com php-src: test to function ReflectionParameter::isArray: ext/reflection/tests/ReflectionClass_isArray.phpt
| From: | Xinchen Hui | Date: | Fri, 05 Feb 2016 14:21:10 +0000 |
| Subject: | com php-src: test to function ReflectionParameter::isArray: ext/reflection/tests/ReflectionClass_isArray.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91036@lists.php.net to get a copy of this message | ||
Commit: 2c7341ca168560529f68a242e49d69b2b3caf1b4
Author: marcosptf <marcosptf@yahoo.com.br> Fri, 5 Feb 2016 12:21:10 -0200
Parents: 81721a7ddd60922b2ff882567db9cc3cc4c5d5db
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c7341ca168560529f68a242e49d69b2b3caf1b4
Log:
test to function ReflectionParameter::isArray
was created a new test uncovered yet!
:-)
Changed paths:
A ext/reflection/tests/ReflectionClass_isArray..phpt
Diff:
diff --git a/ext/reflection/tests/ReflectionClass_isArray.phpt
b/ext/reflection/tests/ReflectionClass_isArray.phpt
new file mode 100644
index 0000000..b7451db
--- /dev/null
+++ b/ext/reflection/tests/ReflectionClass_isArray.phpt
@@ -0,0 +1,29 @@
+--TEST--
+public bool ReflectionParameter::isArray ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
+--FILE--
+<?php
+function testReflectionIsArray($a = null, $b = 0, array $c, $d=true, array $e, $f=1.5,
$g="", array $h, $i="#F989898") {}
+
+$reflection = new ReflectionFunction('testReflectionIsArray');
+
+foreach ($reflection->getParameters() as $parameter) {
+ var_dump($parameter->isArray());
+}
+?>
+--CLEAN--
+<?php
+unset($reflection);
+unset($parameter);
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)