Ejemplo n.º 1
0
 /**
  * @param $string
  */
 public function handleArgsString($string)
 {
     $option = $this->createEnvOption();
     $option->parseString($string);
     $this->detectEnvFromOption($option);
     $this->start();
     $this->console->parseString($string);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 /**
  * @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;
     }
 }