diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-11-23 18:48:51 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2015-11-23 18:48:51 +0800 |
commit | 8c51578c81c04b6e9efa03b75e9473cfa5ad550f (patch) | |
tree | 91a024837be788bc70352620730313ff8413fb60 /ext/reflection/tests | |
parent | 45c5e271830e5adb4fb9818efac4b2eaa98a2136 (diff) | |
parent | b9845e5006adb7a41d6fdf5d36fc3b5c129f8946 (diff) | |
download | php-git-8c51578c81c04b6e9efa03b75e9473cfa5ad550f.tar.gz |
Merge branch 'PHP-5.6' into PHP-7.0
Diffstat (limited to 'ext/reflection/tests')
-rw-r--r-- | ext/reflection/tests/ReflectionMethod_defaultArg.phpt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionMethod_defaultArg.phpt b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt new file mode 100644 index 0000000000..1c04cade5f --- /dev/null +++ b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt @@ -0,0 +1,44 @@ +--TEST-- +ReflectionMethod and RECV_INIT (bug #70957 and #70958) +--FILE-- +<?php +Abstract class F { + private function bar($a = self::class) {} +} + +Trait T +{ + private function bar($a = self::class) {} +} + + +class B { + use T; +} + +echo new \ReflectionMethod('F', 'bar'); +echo new \ReflectionMethod('T', 'bar'); +echo new \ReflectionMethod('B', 'bar'); +?> +--EXPECTF-- +Method [ <user> private method bar ] { + @@ %s + + - Parameters [1] { + Parameter #0 [ <optional> $a = 'F' ] + } +} +Method [ <user> private method bar ] { + @@ %s + + - Parameters [1] { + Parameter #0 [ <optional> $a = 'T' ] + } +} +Method [ <user> private method bar ] { + @@ %s + + - Parameters [1] { + Parameter #0 [ <optional> $a = 'B' ] + } +} |