Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->currentInput = $input;
     $formatter = $this->getHelper('formatter');
     try {
         $initializer = new MagentoInitializer($this->getTargetPath());
         $stateFilename = $this->getStateFileName();
         $initializer->saveState($stateFilename);
         $output->writeln($formatter->formatBlock('Magento state has been successfully saved to:', 'info'));
         $output->writeln($formatter->formatBlock($stateFilename, 'comment'));
     } catch (\InvalidArgumentException $e) {
         $output->writeln($formatter->formatBlock($e->getMessage(), 'error'));
         return;
     }
 }
 public function testContructorOfInitializerShouldSupportDefaultStoreAndScope()
 {
     // prepare
     $initializer = new MagentoInitializer($this->_target);
     // act
     $initializer->initialize();
     // assert
     Helper::assertRunParametersIsCorrect($this->_target, $this->_magento);
 }