/**
* @param $stepMethodName string
* @param $encodedStepArguments string
*/
protected function callStepInSubProcess($stepMethodName, $encodedStepArguments = '', $withoutSecurityChecks = FALSE)
{
if (strpos($stepMethodName, '::') !== 0) {
$stepMethodName = substr($stepMethodName, strpos($stepMethodName, '::') + 2);
}
$withoutSecurityChecks = $withoutSecurityChecks === TRUE ? '--without-security-checks ' : '';
$subProcessCommand = sprintf('typo3.flow.tests.functional:behathelper:callbehatstep %s%s %s%s', $withoutSecurityChecks, escapeshellarg($this->behatTestHelperObjectName), $stepMethodName, $encodedStepArguments);
$subProcessResponse = $this->getSubProcess()->execute($subProcessCommand);
Assert::assertStringStartsWith('SUCCESS:', $subProcessResponse, 'We called "' . $subProcessCommand . '" and got: ' . $subProcessResponse);
}