Neos\Flow\Tests\Behavior\Features\Bootstrap\SecurityOperationsTrait::iCanCallTheMethodOfClassWithArguments PHP 메소드

iCanCallTheMethodOfClassWithArguments() 공개 메소드

public iCanCallTheMethodOfClassWithArguments ( $not, $methodName, $className, $arguments = '' )
    public function iCanCallTheMethodOfClassWithArguments($not, $methodName, $className, $arguments = '')
    {
        if ($this->isolated === true) {
            $this->callStepInSubProcess(__METHOD__, sprintf(' %s %s %s %s %s %s %s %s', 'string', escapeshellarg(trim($not)), 'string', escapeshellarg($methodName), 'string', escapeshellarg($className), 'string', escapeshellarg($arguments)));
        } else {
            $this->setupSecurity();
            $instance = $this->objectManager->get($className);
            try {
                $result = call_user_func_array([$instance, $methodName], Arrays::trimExplode(',', $arguments));
                if ($not === 'not') {
                    Assert::fail('Method should not be callable');
                }
                return $result;
            } catch (AccessDeniedException $exception) {
                if ($not !== 'not') {
                    throw $exception;
                }
            }
        }
    }