diff options
Diffstat (limited to 'ext/reflection/tests')
| -rw-r--r-- | ext/reflection/tests/ReflectionParameter_ctor_cast.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionParameter_ctor_cast.phpt b/ext/reflection/tests/ReflectionParameter_ctor_cast.phpt new file mode 100644 index 0000000000..10f45647e6 --- /dev/null +++ b/ext/reflection/tests/ReflectionParameter_ctor_cast.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test method name string cast in ReflectionParameter ctor +--FILE-- +<?php + +class A {} +try { + new ReflectionParameter([ + A::class, + new class { public function __toString() { return 'method'; } } + ], 'param'); +} catch (ReflectionException $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +Method A::method() does not exist |
