bug69180.phpt 428 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Bug #69180: Reflection does not honor trait conflict resolution / method aliasing
  3. --FILE--
  4. <?php
  5. trait T1
  6. {
  7. public function foo()
  8. {
  9. }
  10. }
  11. trait T2
  12. {
  13. use T1 { foo as bar; }
  14. public function foo()
  15. {
  16. }
  17. }
  18. class C
  19. {
  20. use T2;
  21. }
  22. $class = new ReflectionClass('C');
  23. foreach ($class->getMethods() as $method) {
  24. var_dump($method->getName());
  25. }
  26. ?>
  27. --EXPECT--
  28. string(3) "foo"
  29. string(3) "bar"