Ejemplo n.º 1
0
 /**
  * Returns an <b>array</b> with methods defined in the inheritence hierarchy
  * of the reflection class. You can pass an optional filter argument that
  * contains a bitfield of required method modifiers.
  *
  * @param integer $filter Optional filter for the returned methods
  *
  * @return array(\ReflectionMethod)
  */
 public function getMethods($filter = -1)
 {
     if ($this->_parentClass === false) {
         return parent::getMethods($filter);
     }
     return $this->_collectMethodsFromParentClass($filter);
 }
 /**
  * @return void
  * @covers \pdepend\reflection\api\StaticReflectionInterface
  * @group reflection
  * @group reflection::api
  * @group unittest
  */
 public function testGetMethodsFiltersBySuppliedModifierArgument()
 {
     $interface = new StaticReflectionInterface(__CLASS__, '');
     $interface->initMethods(array(new StaticReflectionMethod('foo', '', \ReflectionMethod::IS_FINAL), new StaticReflectionMethod('bar', '', \ReflectionMethod::IS_PRIVATE)));
     $this->assertSame(1, count($interface->getMethods(\ReflectionMethod::IS_FINAL)));
 }