/** * @param $string */ public function handleArgsString($string) { $option = $this->createEnvOption(); $option->parseString($string); $this->detectEnvFromOption($option); $this->start(); $this->console->parseString($string); }
function it_runs_help_for_command(IInput $input, IOutput $output, IConsole $console) { $input->hasOption('--help')->willReturn(true); $input->getArgument('args')->willReturn(['name']); $console->parseString('help name')->shouldBeCalled(); $this->run($input, $output, $console); }
/** * @param IInput $input * @param IOutput $output * @param IConsole $console * * @return bool */ public function run(IInput $input, IOutput $output, IConsole $console) { if ($input->hasOption('--help')) { $args = $input->getArgument('args'); $subject = array_shift($args); $console->parseString("help {$subject}"); return false; } }