Neos\Flow\Tests\Functional\Command\BehatHelperCommandController::callBehatStepCommand PHP Метод

callBehatStepCommand() публичный Метод

Calls a behat step method
public callBehatStepCommand ( string $testHelperObjectName, string $methodName, boolean $withoutSecurityChecks = false )
$testHelperObjectName string
$methodName string
$withoutSecurityChecks boolean
    public function callBehatStepCommand($testHelperObjectName, $methodName, $withoutSecurityChecks = false)
    {
        $testHelper = $this->objectManager->get($testHelperObjectName);
        $rawMethodArguments = $this->request->getExceedingArguments();
        $mappedArguments = [];
        for ($i = 0; $i < count($rawMethodArguments); $i += 2) {
            $mappedArguments[] = $this->propertyMapper->convert($rawMethodArguments[$i + 1], $rawMethodArguments[$i]);
        }
        $result = null;
        try {
            if ($withoutSecurityChecks === true) {
                $this->securityContext->withoutAuthorizationChecks(function () use($testHelper, $methodName, $mappedArguments, &$result) {
                    $result = call_user_func_array([$testHelper, $methodName], $mappedArguments);
                });
            } else {
                $result = call_user_func_array([$testHelper, $methodName], $mappedArguments);
            }
        } catch (\Exception $exception) {
            $this->outputLine('EXCEPTION: %s %d %s in %s:%s %s', [get_class($exception), $exception->getCode(), $exception->getMessage(), $exception->getFile(), $exception->getLine(), $exception->getTraceAsString()]);
            return;
        }
        $this->output('SUCCESS: %s', [$result]);
    }
BehatHelperCommandController