Redaxscript\Tests\TestCaseAbstract::callMethod PHP Method

callMethod() public method

callMethod
Since: 3.0.0
public callMethod ( object $object = null, string $method = null, array $argumentArray = [] ) : mixed
$object object
$method string
$argumentArray array
return mixed
    public function callMethod($object = null, $method = null, $argumentArray = [])
    {
        $reflectionObject = new ReflectionClass($object);
        $reflectionMethod = $reflectionObject->getMethod($method);
        $reflectionMethod->setAccessible(true);
        return $reflectionMethod->invokeArgs($object, $argumentArray);
    }