1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/ext/reflection/tests/ReflectionClass_getInterfaces_002.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

53 lines
920 B
PHP

--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);
?>
--EXPECT--
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
)
)