summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/interface_001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/interface_001.phpt')
-rw-r--r--Zend/tests/traits/interface_001.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/traits/interface_001.phpt b/Zend/tests/traits/interface_001.phpt
new file mode 100644
index 0000000..a14f78e
--- /dev/null
+++ b/Zend/tests/traits/interface_001.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Using traits to implement interface
+--FILE--
+<?php
+
+trait foo {
+ public function abc() {
+ }
+}
+
+interface baz {
+ public function abc();
+}
+
+class bar implements baz {
+ use foo;
+
+}
+
+new bar;
+print "OK\n";
+
+?>
+--EXPECT--
+OK