Пример #1
0
 /**
  * Test if the `getMethods` method returns a list of methods within a class.
  */
 public function testGetMethods()
 {
     $class = new ReflectionClass(self::FIXTURE_NS . '\\ClassWithMethods');
     $methods = $class->getMethods(InternalReflectionMethod::IS_PUBLIC);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionMethod', $methods[0]);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionMethod', $methods[1]);
     $this->assertEquals('foo', $methods[0]->name);
     $this->assertEquals('bar', $methods[1]->name);
 }