From 4158f7e1221ef5b69e8ba0aadd547a6ee2baa827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Sun, 30 May 2010 01:00:45 +0000 Subject: - More trait reflection work #- I'm not happy about ReflectionClass::getTraitAliases, yet --- ext/reflection/tests/traits004.phpt | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 ext/reflection/tests/traits004.phpt (limited to 'ext/reflection/tests/traits004.phpt') diff --git a/ext/reflection/tests/traits004.phpt b/ext/reflection/tests/traits004.phpt new file mode 100644 index 0000000000..c9367c1f48 --- /dev/null +++ b/ext/reflection/tests/traits004.phpt @@ -0,0 +1,58 @@ +--TEST-- +ReflectionClass::getTraits() and ReflectionClass::getTraitNames +--FILE-- +getTraitNames()); + var_dump($r->getTraits()); + echo "\n"; +} +--EXPECT-- +class C1: +array(0) { +} +array(0) { +} + +class C2: +array(1) { + [0]=> + string(2) "T1" +} +array(1) { + ["T1"]=> + &object(ReflectionClass)#1 (1) { + ["name"]=> + string(2) "T1" + } +} + +class C3: +array(2) { + [0]=> + string(2) "T1" + [1]=> + string(2) "T2" +} +array(2) { + ["T1"]=> + &object(ReflectionClass)#2 (1) { + ["name"]=> + string(2) "T1" + } + ["T2"]=> + &object(ReflectionClass)#3 (1) { + ["name"]=> + string(2) "T2" + } +} + -- cgit v1.2.1