public static function setUpBeforeClass() { SeleniumManager::ensureSeleniumIsRunning(); self::set('shopManager', ShopManager::getInstance()); self::newShop(); register_shutdown_function([get_called_class(), 'tearDownAfterClass']); }
protected function execute(InputInterface $input, OutputInterface $output) { if (!SeleniumManager::isSeleniumStarted()) { SeleniumManager::spawnSelenium(); } SeleniumManager::ensureSeleniumIsRunning(); $shop = ShopManager::getInstance()->getShop(['temporary' => false, 'use_cache' => false, 'overwrite' => true]); $shop->getInstaller()->install($shop->getOptionProvider()->getValues('ShopInstallation', $input)); $shop->getBrowser()->quit(); }
protected function execute(InputInterface $input, OutputInterface $output) { $shop = ShopManager::getInstance()->getShop(['temporary' => false, 'use_cache' => false, 'overwrite' => false]); $dumpFileName = $input->getArgument('fileName'); if (!file_exists($dumpFileName)) { $output->writeln('<error>File ' . $dumpFileName . ' not found!</error>'); return; } $shop->getDatabaseManager()->loadDump($dumpFileName); }
protected function execute(InputInterface $input, OutputInterface $output) { SeleniumManager::ensureSeleniumIsRunning(); $shop = ShopManager::getInstance()->getShop(null, false); $lc = $input->getArgument('TwoLettersLanguageCode'); $shop->getBackOfficeNavigator()->login(); $translations = $shop->getPageObject('AdminTranslations'); $translations->visit(); $translations->addOrUpdateLanguage($lc); }
protected function execute(InputInterface $input, OutputInterface $output) { $manager = null; try { $manager = ShopManager::getInstance(); } catch (\Exception $e) { // no shop, but still things to clean, probably } if ($manager) { $manager->cleanProject(); if ($input->getOption('update')) { $manager->updateRepo(); } } else { ShopManager::cleanDirectory(); } }
protected function execute(InputInterface $input, OutputInterface $output) { $shop = ShopManager::getInstance()->getShop(['temporary' => false, 'use_cache' => false, 'overwrite' => false]); $dumpFileName = $input->getArgument('fileName'); $shop->getDatabaseManager()->dumpTo($dumpFileName); }