App\Lib\Codeception::getCommandPath PHP Method

getCommandPath() public method

Full command to run a Codeception test.
public getCommandPath ( string $type, string $filename, $env ) : string
$type string Test Type (Acceptance, Functional, Unit)
$filename string Name of the Test
return string Full command to execute Codeception with requred parameters.
    public function getCommandPath($type, $filename, $env)
    {
        // Build all the different parameters as part of the console command
        $params = array_merge(array($this->config['executable'], "run", "--no-colors", "--config=\"{$this->site->getConfig()}\""), $env, array($type, $filename, "2>&1"));
        //Run Codeception executable with a PHP command
        if (isset($this->config['run_php']) && $this->config['run_php']) {
            array_unshift($params, "php ");
        }
        //Add Debug command to command line if set in configuration
        if (isset($this->config['debug']) && $this->config['debug']) {
            $params[] = "--debug";
        }
        //Add Steps command to command line if set in configuration
        if (isset($this->config['steps']) && $this->config['steps']) {
            $params[] = "--steps";
        }
        // Build the command to be run.
        return implode(' ', $params);
    }