/** * Get progress. * * @param InputInterface $input * @param OutputInterface $output * * @return Decorator */ protected function getProgress(InputInterface $input, OutputInterface $output) { if ($input->getOption('no-progress')) { $output = new NullOutput(); } // export progress only for one storage if (!$input->getArgument('storage')) { $input->setOption('export', null); } if ($export_file = $input->getOption('export')) { // progress is redirected to the export file $input->setOption('no-progress', true); $progress = new Export($this->getHelperSet()->get('progress'), new NullOutput(), $export_file); } else { $progress = new PresetOutput($this->getHelperSet()->get('progress'), $output); } $progress->setBarCharacter('<comment>=</comment>'); return $progress; }
public function testStart() { $this->progress->expects($this->once())->method('start')->with($this->output, 123); $this->preset_output->start(123); }