Skip to content

Commit

Permalink
Update test with reflection part
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Feb 21, 2025
1 parent 07bb42b commit 3fedff1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Zend/tests/attributes/deprecated/functions/gh17866.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@ class Foo {
$foo = new Foo;
$closure = Closure::fromCallable($foo);
$test = $closure->__invoke(...);

$rc = new ReflectionMethod($test, '__invoke');
var_dump($rc->getAttributes());

$test();

?>
--EXPECTF--
array(1) {
[0]=>
object(ReflectionAttribute)#%d (1) {
["name"]=>
string(10) "Deprecated"
}
}

Deprecated: Method Foo::__invoke() is deprecated, xyzzy in %s on line %d
In __invoke

0 comments on commit 3fedff1

Please sign in to comment.