From ddb2c0584149313d80fbec89f01264338b0073b7 Mon Sep 17 00:00:00 2001 From: Ant Phillips Date: Tue, 18 Nov 2008 15:37:57 +0000 Subject: Reflection tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows, Linux and Linux 64 bit). --- .../ReflectionClass_getDefaultProperties_001.phpt | 198 +++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt (limited to 'ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt') diff --git a/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt b/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt new file mode 100644 index 0000000000..3bf8f77ec6 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_getDefaultProperties_001.phpt @@ -0,0 +1,198 @@ +--TEST-- +ReflectionClass::getDefaultProperties(), ReflectionClass::getStaticProperties() +--CREDITS-- +Robin Fernandes +Steve Seear +--FILE-- +getStaticProperties()); + echo "\n\n---- Default properties in $class ----\n"; + print_r($rc->getDefaultProperties()); +} + +?> +--EXPECTF-- +---- Static properties in A ---- +Array +( + [statPubC] => stat pubC in A + [statProtC] => stat protC in A + [statPrivC] => stat privC in A + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [statPrivA] => stat privA in A +) + + +---- Default properties in A ---- +Array +( + [statPubC] => stat pubC in A + [statProtC] => stat protC in A + [statPrivC] => stat privC in A + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [statPrivA] => stat privA in A + [pubC] => pubC in A + [protC] => protC in A + [privC] => privC in A + [pubA] => pubA in A + [protA] => protA in A + [privA] => privA in A +) + + +---- Static properties in B ---- +Array +( + [statPubC] => stat pubC in B + [statProtC] => stat protC in B + [statPrivC] => stat privC in A + [statPubB] => stat pubB in B + [statProtB] => stat protB in B + [statPrivB] => stat privB in B + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [statPrivA] => stat privA in A +) + + +---- Default properties in B ---- +Array +( + [statPubC] => stat pubC in B + [statProtC] => stat protC in B + [statPrivC] => stat privC in B + [statPubB] => stat pubB in B + [statProtB] => stat protB in B + [statPrivB] => stat privB in B + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [pubC] => pubC in B + [protC] => protC in B + [privC] => privC in B + [pubB] => pubB in B + [protB] => protB in B + [privB] => privB in B + [pubA] => pubA in A + [protA] => protA in A +) + + +---- Static properties in C ---- +Array +( + [statPubC] => stat pubC in C + [statProtC] => stat protC in C + [statPrivC] => stat privC in A + [statPubB] => stat pubB in B + [statProtB] => stat protB in B + [statPrivB] => stat privB in B + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [statPrivA] => stat privA in A +) + + +---- Default properties in C ---- +Array +( + [statPubC] => stat pubC in C + [statProtC] => stat protC in C + [statPrivC] => stat privC in C + [statPubB] => stat pubB in B + [statProtB] => stat protB in B + [statPubA] => stat pubA in A + [statProtA] => stat protA in A + [pubC] => pubC in C + [protC] => protC in C + [privC] => privC in C + [pubB] => pubB in B + [protB] => protB in B + [pubA] => pubA in A + [protA] => protA in A +) + + +---- Static properties in X ---- +Array +( + [statPubC] => stat pubC in X + [statProtC] => stat protC in X + [statPrivC] => stat privC in X +) + + +---- Default properties in X ---- +Array +( + [statPubC] => stat pubC in X + [statProtC] => stat protC in X + [statPrivC] => stat privC in X + [pubC] => pubC in X + [protC] => protC in X + [privC] => privC in X +) + -- cgit v1.2.1