bug60165d.phpt 412 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
  3. --FILE--
  4. <?php
  5. // The same is true for the insteadof operator to resolve conflicts
  6. trait A {}
  7. trait B {
  8. public function bar() {}
  9. }
  10. class MyClass {
  11. use A, B {
  12. A::bar insteadof B;
  13. }
  14. }
  15. ?>
  16. --EXPECTF--
  17. Fatal error: A precedence rule was defined for A::bar but this method does not exist in %s on line %d