summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/interface_002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/interface_002.phpt')
-rw-r--r--Zend/tests/traits/interface_002.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/traits/interface_002.phpt b/Zend/tests/traits/interface_002.phpt
new file mode 100644
index 0000000..462d73f
--- /dev/null
+++ b/Zend/tests/traits/interface_002.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Checking error message when the trait doesn't implements the interface
+--FILE--
+<?php
+
+trait foo {
+ public function a() {
+ }
+}
+
+interface baz {
+ public function abc();
+}
+
+class bar implements baz {
+ use foo;
+
+}
+
+new bar;
+
+?>
+--EXPECTF--
+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