public function testInvokeMethod() { $category = new AcCategory(); $this->assertTrue(is_callable([$category, 'publicMethod'])); $privateMethodName = 'privateMethod'; $this->assertFalse(is_callable([$category, $privateMethodName])); $this->assertEquals('private method', invoke_method($category, $privateMethodName)); }
public function invokeMethod($object, $methodName, $values = []) { return invoke_method($object, $methodName, $values); }