diff options
Diffstat (limited to 'Zend/tests/traits/static_get_called_class.phpt')
-rw-r--r-- | Zend/tests/traits/static_get_called_class.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/traits/static_get_called_class.phpt b/Zend/tests/traits/static_get_called_class.phpt new file mode 100644 index 0000000..dc29ece --- /dev/null +++ b/Zend/tests/traits/static_get_called_class.phpt @@ -0,0 +1,24 @@ +--TEST--
+Traits and get_called_class().
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return get_called_class();
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ class B extends A { }
+
+ echo B::test();
+
+?>
+--EXPECT--
+B
\ No newline at end of file |