/** * {@inheritdoc} */ protected function initialize(InputInterface $input, OutputInterface $output) { $config = $input->getArgument(self::INPUT_KEY_CONFIG); $this->config->init($config); //@todo: interactively ask for config file $reset = $input->getOption(self::INPUT_KEY_RESET); if ($reset) { $output->writeln('Reset the current position of migration to start from the beginning'); $this->progress->reset(); } if ($output->getVerbosity() > 1) { $this->logManager->process($this->verbosityLevels[$output->getVerbosity()]); } else { $this->logManager->process(); } }
/** * @return void */ protected function optionReset() { if ($this->getArg('reset') === true) { $this->logger->info('Reset the current position of migration to start from the beginning'); $this->progress->reset(); } }
/** * @return void */ public function testResetObject() { $step = $this->getMock('\\Migration\\Step\\Map', [], [], '', false); $data = [get_class($step) => ['dummy_array']]; $this->file->expects($this->once())->method('getData')->will($this->returnValue($data)); $this->file->expects($this->once())->method('saveData')->with([]); $this->progress->reset($step); }