summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/abstract-methods01.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/bugs/abstract-methods01.phpt')
-rw-r--r--Zend/tests/traits/bugs/abstract-methods01.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/traits/bugs/abstract-methods01.phpt b/Zend/tests/traits/bugs/abstract-methods01.phpt
new file mode 100644
index 0000000..6275caa
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods01.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+class TraitsTest {
+ use THello;
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Fatal error: Class %s contains %d abstract method and must therefore be declared abstract or implement the remaining methods (%s) in %s on line %d \ No newline at end of file