Beispiel #1
0
 /**
  * @covers PsUtil::newReflectionMethod
  */
 public function testNewReflectionMethod()
 {
     PsUtil::assertInstanceOf(PsUtil::newReflectionMethod(ClassA::get__CLASS__(), 'get__FILE__'), 'ReflectionMethod');
     PsUtil::assertInstanceOf(PsUtil::newReflectionMethod(new ClassA(), 'private_final_method'), 'ReflectionMethod');
     try {
         PsUtil::newReflectionMethod(new ClassA(), self::NOT_ALLOWED_STR);
         $this->fail('ReflectionException is expected');
     } catch (ReflectionException $ex) {
         //OK
     }
 }
Beispiel #2
0
 public function __construct($class, $method)
 {
     $this->rm = PsUtil::newReflectionMethod($class, $method);
 }