/** * testGetPrototypeParentClassHidesParentInterface * * @return void * @covers \pdepend\reflection\api\StaticReflectionMethod * @group reflection * @group reflection::api * @group unittest */ public function testGetPrototypeParentClassHidesParentInterface() { $method = new StaticReflectionMethod('foo', '', 0); $interface = new StaticReflectionInterface('IFoo', ''); $interface->initMethods(array(new StaticReflectionMethod('foo', '', 0))); $declaringClass = new StaticReflectionClass('Bar', '', 0); $declaringClass->initMethods(array($method)); $declaringClass->initInterfaces(array($interface)); $this->assertSame($interface, $method->getPrototype()->getDeclaringClass()); }
/** * @return void * @covers \pdepend\reflection\api\StaticReflectionInterface * @group reflection * @group reflection::api * @group unittest * @expectedException \LogicException */ public function testInitMethodsThrowsLogicExceptionWhenCalledMoreThanOnce() { $interface = new StaticReflectionInterface(__CLASS__, ''); $interface->initMethods(array()); $interface->initMethods(array()); }