5.3.2ã«ãªã£ã¦PHPã®ReflectionMethodã«setAccessibleãå®è£ ããã¦ããã ã¨ãããã¨ã§ãããã§privateã¡ã½ããã®ãã¹ããç°¡åã«å®ç¾ãããã¨ãã§ãã¾ãã public function testGetMaxFile() { $this->object = TargetClass::getInstance(); $method = new ReflectionMethod("TargetClass", "targetMethod"); $method->setAccessible(true); $this->assertEquals('expected',$method->invoke($this->object,"arg")); }
{{#tags}}- {{label}}
{{/tags}}