interface_002.phpt 411 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Checking error message when the trait doesn't implements the interface
  3. --FILE--
  4. <?php
  5. trait foo {
  6. public function a() {
  7. }
  8. }
  9. interface baz {
  10. public function abc();
  11. }
  12. class bar implements baz {
  13. use foo;
  14. }
  15. new bar;
  16. ?>
  17. --EXPECTF--
  18. Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (baz::abc) in %s on line %d