diff options
author | Stefan Marr <gron@php.net> | 2010-11-17 23:05:20 +0000 |
---|---|---|
committer | Stefan Marr <gron@php.net> | 2010-11-17 23:05:20 +0000 |
commit | 6ad5c889a1a6fef8fbf1d6b00566dd6a31f4cc91 (patch) | |
tree | 55b5ebb45a2e9b26406fed3a730abe04a1a4b16d /Zend/tests/traits/static_002.phpt | |
parent | 45189fa8030b8d1df48c9dcfeb49fb119d6b1ab5 (diff) | |
download | php-git-6ad5c889a1a6fef8fbf1d6b00566dd6a31f4cc91.tar.gz |
Added tests to for static support of traits.
# This was not tested and documented yet.
# Updated documentation in the RFC http://wiki.php.net/rfc/horizontalreuse
Diffstat (limited to 'Zend/tests/traits/static_002.phpt')
-rw-r--r-- | Zend/tests/traits/static_002.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/traits/static_002.phpt b/Zend/tests/traits/static_002.phpt new file mode 100644 index 0000000000..c076085519 --- /dev/null +++ b/Zend/tests/traits/static_002.phpt @@ -0,0 +1,23 @@ +--TEST--
+Traits with static methods referenced using variable.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return 'Test';
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ $class = "A";
+ echo $class::test();
+
+?>
+--EXPECT--
+Test
\ No newline at end of file |