mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
6545f656be
The method was not tested against a class without interface.
31 lines
474 B
PHP
31 lines
474 B
PHP
--TEST--
|
|
ReflectionClass::getInterfaceNames()
|
|
--CREDITS--
|
|
Michelangelo van Dam <dragonbe@gmail.com>
|
|
#testfest roosendaal on 2008-05-10
|
|
--FILE--
|
|
<?php
|
|
interface Foo { }
|
|
|
|
interface Bar { }
|
|
|
|
class Baz implements Foo, Bar { }
|
|
|
|
class Qux {}
|
|
|
|
$rc1 = new ReflectionClass("Baz");
|
|
var_dump($rc1->getInterfaceNames());
|
|
|
|
$rc2 = new ReflectionClass("Qux");
|
|
var_dump($rc2->getInterfaceNames());
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[0]=>
|
|
string(3) "Foo"
|
|
[1]=>
|
|
string(3) "Bar"
|
|
}
|
|
array(0) {
|
|
}
|