summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt
blob: ff8dca4703d0891e8f84ece79087b84c7afe1ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--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) {
}