getInterfaces() public method

If the class name is actually an interface then just that interface is returned.
public getInterfaces ( )
 function testInterfacesListedForSubclass()
 {
     $reflection = new SimpleReflection('AnyOldSubclass');
     $this->assertEqual($reflection->getInterfaces(), array('AnyOldInterface'));
 }
Esempio n. 2
0
 function testNoInterfacesForPHP4()
 {
     $reflection = new SimpleReflection('AnyOldThing');
     $this->assertEqual($reflection->getInterfaces(), array());
 }
 function testProperlyReflectsTheFinalInterfaceWhenObjectImplementsAnExtendedInterface()
 {
     $reflection = new SimpleReflection('AnyDescendentImplementation');
     $interfaces = $reflection->getInterfaces();
     $this->assertEqual(1, count($interfaces));
     $this->assertEqual('AnyDescendentInterface', array_shift($interfaces));
 }