Exemplo n.º 1
0
 /**
  * @param TaskEvent $event
  */
 public function advanceProgress(TaskEvent $event)
 {
     $taskReflection = new ReflectionClass($event->getTask());
     $taskName = $taskReflection->getShortName();
     $this->progressBar->setFormat($this->progressFormat);
     $this->progressBar->setMessage($taskName);
     $this->progressBar->advance();
 }
Exemplo n.º 2
0
 function it_should_advance_progress(ProgressBar $progressBar, TaskEvent $event, TaskInterface $task)
 {
     $event->getTask()->willReturn($task);
     $progressBar->setFormat(Argument::type('string'))->shouldBeCalled();
     $progressBar->setOverwrite(false)->shouldBeCalled();
     $progressBar->setMessage(Argument::type('string'))->shouldBeCalled();
     $progressBar->advance()->shouldBeCalled();
     $this->advanceProgress($event);
 }
Exemplo n.º 3
0
 /**
  * @param TaskInterface $task
  * @param Exception     $exception
  */
 public function __construct(TaskInterface $task, Exception $exception)
 {
     parent::__construct($task);
     $this->exception = $exception;
 }