public function iRunBehat($argumentsString = '')
    {
        $argumentsString = strtr($argumentsString, ['\'' => '"']);

        if ('/' === DIRECTORY_SEPARATOR) {
            $argumentsString .= ' 2>&1';
        }

        exec($command = sprintf(
            '%s %s %s --no-time',
            BEHAT_PHP_BIN_PATH,
            escapeshellarg(BEHAT_BIN_PATH),
            $argumentsString
        ), $output, $return);

        $this->lastBehatStdOut = trim(implode("\n", $output));
    }
public function iRunBehat($argumentsString = '')
    {
        $argumentsString = strtr($argumentsString, ['\'' => '"']);

        if ('/' === DIRECTORY_SEPARATOR) {
            $argumentsString .= ' 2>&1';
        }

        exec($command = sprintf(
            '%s %s %s --no-time',
            BEHAT_PHP_BIN_PATH,
            escapeshellarg(BEHAT_BIN_PATH),
            $argumentsString
        ), $output, $return);

        $this->lastBehatStdOut = trim(implode("\n", $output));
    }
public function iRunBehat ( $ argumentsString = '' ) { $ argumentsString = strtr ( $ argumentsString , [ '\'' => '"' ] ) ; if ( '/' === DIRECTORY_SEPARATOR ) { $ argumentsString .= ' 2>&1' ; } exec ( $ command = sprintf ( '%s %s %s --no-time' , BEHAT_PHP_BIN_PATH , escapeshellarg ( BEHAT_BIN_PATH ) , $ argumentsString ) , $ output , $ return ) ; $ this -> lastBehatStdOut = trim ( implode ( "\n" , $ output ) ) ; }
Runs behat command with provided parameters.

Taken from Behat's features/bootstrap/Hooks/FeatureContext::iRunBehat() with some modifications
Copyright (c) 2011-2013 Konstantin Kudryashov <ever.zet@gmail.com>

@When /^I run "behat(?: ([^"]*))?"$/

@param string $argumentsString
Runs behat command with provided parameters .