コード例 #1
0
 function it_executes_the_wanted_command(Command $command)
 {
     $name = 'another-command';
     $input = array();
     $command->getName()->willReturn('another-command');
     $command->execute($input)->shouldBeCalled();
     $this->addCommand($command);
     $this->run($name, $input);
 }
コード例 #2
0
 /** @param Command $command */
 public function addCommand(Command $command)
 {
     $this->commands[$command->getName()] = $command;
 }