xref: /php-src/ext/reflection/tests/bug69180.phpt (revision 53efa1b0)
1--TEST--
2Bug #69180: Reflection does not honor trait conflict resolution / method aliasing
3--FILE--
4<?php
5
6trait T1
7{
8    public function foo()
9    {
10    }
11}
12
13trait T2
14{
15    use T1 { foo as bar; }
16
17    public function foo()
18    {
19    }
20}
21
22
23class C
24{
25    use T2;
26}
27
28$class = new ReflectionClass('C');
29
30foreach ($class->getMethods() as $method) {
31    var_dump($method->getName());
32}
33
34?>
35--EXPECT--
36string(3) "foo"
37string(3) "bar"
38