/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/setup-integration/framework/removeTestModules.php
29 строк
928 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ /** * @var $testFrameworkDir string - Must be defined in parent script. */ /** * Copy test modules to app/code/Magento to make them visible for Magento instance. */ $pathToCommittedTestModules = $testFrameworkDir . '/../_files/Magento'; $pathToInstalledMagentoInstanceModules = $testFrameworkDir . '/../../../../app/code/Magento'; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($pathToCommittedTestModules, RecursiveDirectoryIterator::FOLLOW_SYMLINKS) ); //collect test modules dirs name $testModuleNames = array_diff(scandir($pathToCommittedTestModules), ['..', '.']); //remove test modules from magento codebase foreach ($testModuleNames as $name) { $folder = $pathToInstalledMagentoInstanceModules . '/' . $name; if (is_dir($folder)) { \Magento\Framework\Filesystem\Io\File::rmdirRecursive($folder); } }