com php-src: Fixed test: Zend/tests/bug69802.phpt ext/reflection/tests/bug69802.phpt
| From: | Xinchen Hui | Date: | Thu, 27 Jul 2017 04:50:17 +0000 |
| Subject: | com php-src: Fixed test: Zend/tests/bug69802.phpt ext/reflection/tests/bug69802.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98833@lists.php.net to get a copy of this message | ||
Commit: 9fcfe52d03bc40cfce8306debe2e91d83a560683
Author: Xinchen Hui <laruence@gmail.com> Thu, 27 Jul 2017 12:50:17 +0800
Parents: e36c04ef483d85fe145ee07280d8c31e7e295644
Branches: PHP-7.0 PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9fcfe52d03bc40cfce8306debe2e91d83a560683
Log:
Fixed test
Changed paths:
D Zend/tests/bug69802.phpt
A ext/reflection/tests/bug69802.phpt
Diff:
diff --git a/Zend/tests/bug69802.phpt b/Zend/tests/bug69802.phpt
deleted file mode 100644
index ed0430f..0000000
--- a/Zend/tests/bug69802.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
---FILE--
-<?php
-$f = function(stdClass $x): stdClass {};
-$r = new ReflectionMethod($f, '__invoke');
-var_dump($r->getParameters()[0]->getName());
-var_dump($r->getParameters()[0]->getClass());
-echo $r->getParameters()[0], "\n";
-echo $r->getReturnType(),"\n";
-echo $r,"\n";
-?>
---EXPECT--
-string(1) "x"
-object(ReflectionClass)#4 (1) {
- ["name"]=>
- string(8) "stdClass"
-}
-Parameter #0 [ <required> stdClass $x ]
-stdClass
-Method [ <internal, prototype Closure> public method __invoke ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> stdClass $x ]
- }
- - Return [ stdClass ]
-}
diff --git a/ext/reflection/tests/bug69802.phpt b/ext/reflection/tests/bug69802.phpt
new file mode 100644
index 0000000..e71ac1a
--- /dev/null
+++ b/ext/reflection/tests/bug69802.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
+--FILE--
+<?php
+$f = function(stdClass $x): stdClass {};
+$r = new ReflectionMethod($f, '__invoke');
+var_dump($r->getParameters()[0]->getName());
+var_dump($r->getParameters()[0]->getClass());
+echo $r->getParameters()[0], "\n";
+echo $r->getReturnType(),"\n";
+echo $r,"\n";
+?>
+--EXPECT--
+string(1) "x"
+object(ReflectionClass)#4 (1) {
+ ["name"]=>
+ string(8) "stdClass"
+}
+Parameter #0 [ <required> stdClass $x ]
+stdClass
+Method [ <internal> public method __invoke ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> stdClass $x ]
+ }
+ - Return [ stdClass ]
+}