bug69084.phpt 582 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #69084: Unclear error message when not implementing a renamed abstract trait function
  3. --FILE--
  4. <?php
  5. trait Foo {
  6. abstract public function doStuff();
  7. public function main() {
  8. $this->doStuff();
  9. }
  10. }
  11. class Bar {
  12. use Foo {
  13. Foo::doStuff as doOtherStuff;
  14. }
  15. public function doStuff() {
  16. var_dump(__FUNCTION__);
  17. }
  18. }
  19. $b = new Bar();
  20. $b->main();
  21. ?>
  22. --EXPECTF--
  23. Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d