/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/api-functional/framework/Magento/TestFramework/WebApiApplication.php
74 строки
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\TestFramework; /** * Provides access to the application for the tests * * Allows installation and uninstallation */ class WebApiApplication extends Application { /** * @inheritdoc */ public function run() { throw new \Exception( "Can't start application: purpose of Web API Application is to use classes and models from the application" . " and don't run it" ); } /** * @inheritdoc */ public function install($cleanup) { if ($cleanup) { $this->cleanup(); } $installOptions = $this->getInstallConfig(); /* Install application */ if ($installOptions) { $installCmd = 'php -f ' . BP . '/bin/magento setup:install -vvv'; $installArgs = []; foreach ($installOptions as $optionName => $optionValue) { if (is_bool($optionValue)) { if (true === $optionValue) { $installCmd .= " --$optionName"; } continue; } $installCmd .= " --$optionName=%s"; $installArgs[] = $optionValue; } $this->_shell->execute($installCmd, $installArgs); } /* Set Indexer mode as "Update on Save" & Reindex all the Indexers */ $this->_shell->execute( 'php -f ' . BP . '/bin/magento indexer:set-mode realtime -vvv' ); $this->_shell->execute( 'php -f ' . BP . '/bin/magento indexer:reindex -vvv' ); $this->runPostInstallCommands(); } /** * @inheritdoc * * Return empty array of custom directories * @return array */ protected function getCustomDirs() { return []; } }