public final static function get_behat_command($custombyterm = false, $parallerun = false, $absolutepath = false) {

        $separator = DIRECTORY_SEPARATOR;
        $exec = 'behat';

        // Cygwin uses linux-style directory separators.
        if ($custombyterm && testing_is_cygwin()) {
            $separator = '/';

            // MinGW can not execute .bat scripts.
            if (!testing_is_mingw()) {
                $exec = 'behat.bat';
            }
        }

        // If relative path then prefix relative path.
        if ($absolutepath) {
            $pathprefix = testing_cli_argument_path('/');
            if (!empty($pathprefix)) {
                $pathprefix .= $separator;
            }
        } else {
            $pathprefix = '';
        }

        if (!$parallerun) {
            $command = $pathprefix . 'vendor' . $separator . 'bin' . $separator . $exec;
        } else {
            $command = 'php ' . $pathprefix . 'admin' . $separator . 'tool' . $separator . 'behat' . $separator . 'cli'
                . $separator . 'run.php';
        }
        return $command;
    }
public final static function get_behat_command($custombyterm = false, $parallerun = false, $absolutepath = false) {

        $separator = DIRECTORY_SEPARATOR;
        $exec = 'behat';

        // Cygwin uses linux-style directory separators.
        if ($custombyterm && testing_is_cygwin()) {
            $separator = '/';

            // MinGW can not execute .bat scripts.
            if (!testing_is_mingw()) {
                $exec = 'behat.bat';
            }
        }

        // If relative path then prefix relative path.
        if ($absolutepath) {
            $pathprefix = testing_cli_argument_path('/');
            if (!empty($pathprefix)) {
                $pathprefix .= $separator;
            }
        } else {
            $pathprefix = '';
        }

        if (!$parallerun) {
            $command = $pathprefix . 'vendor' . $separator . 'bin' . $separator . $exec;
        } else {
            $command = 'php ' . $pathprefix . 'admin' . $separator . 'tool' . $separator . 'behat' . $separator . 'cli'
                . $separator . 'run.php';
        }
        return $command;
    }
public final static function get_behat_command ( $ custombyterm = false , $ parallerun = false , $ absolutepath = false ) { $ separator = DIRECTORY_SEPARATOR ; $ exec = 'behat' ; // Cygwin uses linux-style directory separators. if ( $ custombyterm && testing_is_cygwin ( ) ) { $ separator = '/' ; // MinGW can not execute .bat scripts. if ( ! testing_is_mingw ( ) ) { $ exec = 'behat.bat' ; } } // If relative path then prefix relative path. if ( $ absolutepath ) { $ pathprefix = testing_cli_argument_path ( '/' ) ; if ( ! empty ( $ pathprefix ) ) { $ pathprefix .= $ separator ; } } else { $ pathprefix = '' ; } if ( ! $ parallerun ) { $ command = $ pathprefix . 'vendor' . $ separator . 'bin' . $ separator . $ exec ; } else { $ command = 'php ' . $ pathprefix . 'admin' . $ separator . 'tool' . $ separator . 'behat' . $ separator . 'cli' . $ separator . 'run.php' ; } return $ command ; }
Returns the executable path

Allows returning a customized command for cygwin when the
command is just displayed, when using exec(), system() and
friends we stay with DIRECTORY_SEPARATOR as they use the
normal cmd.exe (in Windows).

@param  bool $custombyterm  If the provided command should depend on the terminal where it runs
@param bool $parallelrun If parallel run is installed.
@param bool $absolutepath return command with absolute path.
@return string
Returns the executable path