summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/abstract-methods02.phpt
diff options
context:
space:
mode:
authorStefan Marr <gron@php.net>2010-04-15 21:39:20 +0000
committerStefan Marr <gron@php.net>2010-04-15 21:39:20 +0000
commitb501570ab037a12f9fac93ed446a9ea359de40d8 (patch)
tree5461e4ef483d78bd302a89711b807000baf77ec2 /Zend/tests/traits/bugs/abstract-methods02.phpt
parent4cf81c81d0e13c760c61aa39e93d6e073a86a03a (diff)
downloadphp-git-b501570ab037a12f9fac93ed446a9ea359de40d8.tar.gz
Added traits test cases. No engine changes for now. [TRAITS]
#Getting accustomed to the infrastructure. #Any comments are welcome, especially with regard to syntax and keywords.
Diffstat (limited to 'Zend/tests/traits/bugs/abstract-methods02.phpt')
-rw-r--r--Zend/tests/traits/bugs/abstract-methods02.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/traits/bugs/abstract-methods02.phpt b/Zend/tests/traits/bugs/abstract-methods02.phpt
new file mode 100644
index 0000000000..78abe7d1bc
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods02.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+trait THelloImpl {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest {
+ use THello;
+ use THelloImpl;
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Hello \ No newline at end of file