summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/alias-semantics02.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/bugs/alias-semantics02.phpt')
-rw-r--r--Zend/tests/traits/bugs/alias-semantics02.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/traits/bugs/alias-semantics02.phpt b/Zend/tests/traits/bugs/alias-semantics02.phpt
new file mode 100644
index 0000000..e0b5286
--- /dev/null
+++ b/Zend/tests/traits/bugs/alias-semantics02.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Semantic of alias operation is to provide an additional identifier for the
+method body of the original method.
+It should also work incase the method is fully qualified.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public function a() {
+ echo 'A';
+ }
+}
+
+class TraitsTest {
+ use THello { THello::a as b; }
+}
+
+$test = new TraitsTest();
+$test->a();
+$test->b();
+
+?>
+--EXPECTF--
+AA \ No newline at end of file