summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/methods_003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/methods_003.phpt')
-rw-r--r--Zend/tests/traits/methods_003.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/traits/methods_003.phpt b/Zend/tests/traits/methods_003.phpt
new file mode 100644
index 0000000..1c1218a
--- /dev/null
+++ b/Zend/tests/traits/methods_003.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Testing __construct and __destruct with Trait
+--FILE--
+<?php
+
+trait foo {
+ public function __construct() {
+ var_dump(__FUNCTION__);
+ }
+ public function __destruct() {
+ var_dump(__FUNCTION__);
+ }
+}
+
+class bar {
+ use foo;
+}
+
+new bar;
+
+?>
+--EXPECT--
+string(11) "__construct"
+string(10) "__destruct"