]> granicus.if.org Git - php/commitdiff
test to function ReflectionParameter::isArray
authormarcosptf <marcosptf@yahoo.com.br>
Fri, 5 Feb 2016 14:21:10 +0000 (12:21 -0200)
committermarcosptf <marcosptf@yahoo.com.br>
Fri, 5 Feb 2016 14:21:10 +0000 (12:21 -0200)
was created a new test uncovered yet!
:-)

ext/reflection/tests/ReflectionClass_isArray.phpt [new file with mode: 0644]

diff --git a/ext/reflection/tests/ReflectionClass_isArray.phpt b/ext/reflection/tests/ReflectionClass_isArray.phpt
new file mode 100644 (file)
index 0000000..b7451db
--- /dev/null
@@ -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)