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); }
/** @param Command $command */ public function addCommand(Command $command) { $this->commands[$command->getName()] = $command; }