mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Merge branch 'PHP-7.0'
This commit is contained in:
commit
6dbf8d142f
44
ext/reflection/tests/ReflectionMethod_defaultArg.phpt
Normal file
44
ext/reflection/tests/ReflectionMethod_defaultArg.phpt
Normal file
@ -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' ]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user