/** * @param RunnerEvent $event */ public function startProgress(RunnerEvent $event) { $numberOftasks = $event->getTasks()->count(); $this->progressBar->setFormat('<fg=yellow>%message%</fg=yellow>'); $this->progressBar->setMessage('GrumPHP is sniffing your code!'); $this->progressBar->start($numberOftasks); }
function it_starts_progress(ProgressBar $progressBar, RunnerEvent $event, TasksCollection $tasks) { $tasks->count()->willReturn(2); $event->getTasks()->willReturn($tasks); $progressBar->setFormat(Argument::type('string'))->shouldBeCalled(); $progressBar->setOverwrite(false)->shouldBeCalled(); $progressBar->setMessage(Argument::type('string'))->shouldBeCalled(); $progressBar->start(2)->shouldBeCalled(); $this->startProgress($event); }