ProtobufTest\TestCase::invokeMethod PHP Method

invokeMethod() protected method

protected invokeMethod ( object $object, string $method, array $args = [] ) : mixed
$object object
$method string
$args array
return mixed
    protected function invokeMethod($object, $method, array $args = [])
    {
        $reflection = new \ReflectionMethod($object, $method);
        $reflection->setAccessible(true);
        return $reflection->invokeArgs($object, $args);
    }