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);
}