From 6ad5c889a1a6fef8fbf1d6b00566dd6a31f4cc91 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Wed, 17 Nov 2010 23:05:20 +0000 Subject: [PATCH] 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 --- Zend/tests/traits/static_001.phpt | 22 +++++++++++++++ Zend/tests/traits/static_002.phpt | 23 +++++++++++++++ Zend/tests/traits/static_003.phpt | 27 ++++++++++++++++++ Zend/tests/traits/static_004.phpt | 22 +++++++++++++++ .../traits/static_forward_static_call.phpt | 28 +++++++++++++++++++ .../tests/traits/static_get_called_class.phpt | 24 ++++++++++++++++ 6 files changed, 146 insertions(+) create mode 100644 Zend/tests/traits/static_001.phpt create mode 100644 Zend/tests/traits/static_002.phpt create mode 100644 Zend/tests/traits/static_003.phpt create mode 100644 Zend/tests/traits/static_004.phpt create mode 100644 Zend/tests/traits/static_forward_static_call.phpt create mode 100644 Zend/tests/traits/static_get_called_class.phpt diff --git a/Zend/tests/traits/static_001.phpt b/Zend/tests/traits/static_001.phpt new file mode 100644 index 0000000000..d86cb851b9 --- /dev/null +++ b/Zend/tests/traits/static_001.phpt @@ -0,0 +1,22 @@ +--TEST-- +Traits with static methods. +--CREDITS-- +Simas Toleikis simast@gmail.com +--FILE-- + +--EXPECT-- +Test \ No newline at end of file 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-- + +--EXPECT-- +Test \ No newline at end of file diff --git a/Zend/tests/traits/static_003.phpt b/Zend/tests/traits/static_003.phpt new file mode 100644 index 0000000000..fbe5421c71 --- /dev/null +++ b/Zend/tests/traits/static_003.phpt @@ -0,0 +1,27 @@ +--TEST-- +Traits with late static bindings. +--CREDITS-- +Simas Toleikis simast@gmail.com +--FILE-- + +--EXPECT-- +Test B \ No newline at end of file diff --git a/Zend/tests/traits/static_004.phpt b/Zend/tests/traits/static_004.phpt new file mode 100644 index 0000000000..c360f457f0 --- /dev/null +++ b/Zend/tests/traits/static_004.phpt @@ -0,0 +1,22 @@ +--TEST-- +Traits with __callStatic magic method. +--CREDITS-- +Simas Toleikis simast@gmail.com +--FILE-- + +--EXPECT-- +Test \ No newline at end of file diff --git a/Zend/tests/traits/static_forward_static_call.phpt b/Zend/tests/traits/static_forward_static_call.phpt new file mode 100644 index 0000000000..878cf1fcc1 --- /dev/null +++ b/Zend/tests/traits/static_forward_static_call.phpt @@ -0,0 +1,28 @@ +--TEST-- +Traits and forward_static_call(). +--CREDITS-- +Simas Toleikis simast@gmail.com +--FILE-- + +--EXPECT-- +Forwarded Test A \ No newline at end of file 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 0000000000..dc29ecefa2 --- /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-- + +--EXPECT-- +B \ No newline at end of file -- 2.50.1