public final static function run($options = '') {
        global $CFG;

        $currentcwd = getcwd();
        chdir($CFG->dirroot);
        exec(self::get_behat_command() . ' ' . $options, $output, $code);
        chdir($currentcwd);

        return array($output, $code);
    }
public final static function run($options = '') {
        global $CFG;

        $currentcwd = getcwd();
        chdir($CFG->dirroot);
        exec(self::get_behat_command() . ' ' . $options, $output, $code);
        chdir($currentcwd);

        return array($output, $code);
    }
public final static function run ( $ options = '' ) { global $ CFG ; $ currentcwd = getcwd ( ) ; chdir ( $ CFG -> dirroot ) ; exec ( self :: get_behat_command ( ) . ' ' . $ options , $ output , $ code ) ; chdir ( $ currentcwd ) ; return array ( $ output , $ code ) ; }
Runs behat command with provided options

Execution continues when the process finishes

@param  string $options  Defaults to '' so tests would be executed
@return array            CLI command outputs [0] => string, [1] => integer
Runs behat command with provided options