diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt')
-rw-r--r-- | ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt b/ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt new file mode 100644 index 0000000..328a7c3 --- /dev/null +++ b/ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt @@ -0,0 +1,53 @@ +--TEST-- +ReflectionClass::getInterfaces() - interface ordering. +--CREDITS-- +Robin Fernandes <robinf@php.net> +Steve Seear <stevseea@php.net> +--FILE-- +<?php +interface I1 {} +interface I2 {} +interface I3 {} +interface I4 extends I3 {} +interface I5 extends I4 {} +interface I6 extends I5, I1, I2 {} +interface I7 extends I6 {} + +$rc = new ReflectionClass('I7'); +$interfaces = $rc->getInterfaces(); +print_r($interfaces); +?> +--EXPECTF-- +Array +( + [I6] => ReflectionClass Object + ( + [name] => I6 + ) + + [I2] => ReflectionClass Object + ( + [name] => I2 + ) + + [I1] => ReflectionClass Object + ( + [name] => I1 + ) + + [I4] => ReflectionClass Object + ( + [name] => I4 + ) + + [I3] => ReflectionClass Object + ( + [name] => I3 + ) + + [I5] => ReflectionClass Object + ( + [name] => I5 + ) + +)
\ No newline at end of file |