function it_should_run_commands(Project $project, Command $foo, Command $bar, InputInterface $input, OutputInterface $output) { $foo->getName()->willReturn('foo'); $bar->getName()->willReturn('bar'); $project->resolveDependencies(Argument::any())->willReturn([]); $project->get('foo')->willReturn($foo); $project->get('bar')->willReturn($bar); $this->beConstructedWith('test', $project, ['foo', 'bar']); $foo->run($input, $output)->shouldBeCalled(); $bar->run($input, $output)->shouldBeCalled(); $this->execute($input, $output); }
public function __construct($name, Project $project, array $tasks) { parent::__construct($name); $this->project = $project; $this->tasks = $tasks; }