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