-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5953 from magento-trigger/MC-34427
[Trigger] Remove google-shopping-ads module and cleanup travis configuration
- Loading branch information
Showing
22 changed files
with
537 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
dev/tests/integration/etc/install-config-mysql.travis.php.dist
This file was deleted.
Oops, something went wrong.
126 changes: 126 additions & 0 deletions
126
dev/tests/integration/framework/Magento/TestFramework/Console/CliProxy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\TestFramework\Console; | ||
|
||
use Magento\Framework\Console\Cli; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\ObjectManagerInterface; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Provides the ability to inject additional DI configuration to call a CLI command | ||
*/ | ||
class CliProxy implements \Magento\Framework\ObjectManager\NoninterceptableInterface | ||
{ | ||
/** | ||
* @var Cli | ||
*/ | ||
private $subject; | ||
|
||
/** | ||
* @param string $name | ||
* @param string $version | ||
* @throws \ReflectionException | ||
* @throws LocalizedException | ||
*/ | ||
public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') | ||
{ | ||
$this->subject = new Cli($name, $version); | ||
$this->injectDiConfiguration($this->subject); | ||
} | ||
|
||
/** | ||
* Runs the current application. | ||
* | ||
* @see \Magento\Framework\Console\Cli::doRun | ||
* @param InputInterface $input | ||
* @param OutputInterface $output | ||
* @return int|null | ||
* @throws \Exception | ||
*/ | ||
public function doRun(InputInterface $input, OutputInterface $output) | ||
{ | ||
return $this->getSubject()->doRun($input, $output); | ||
} | ||
|
||
/** | ||
* Runs the current application. | ||
* | ||
* @see \Symfony\Component\Console\Application::run | ||
* @param InputInterface|null $input | ||
* @param OutputInterface|null $output | ||
* @return int | ||
* @throws \Exception | ||
*/ | ||
public function run(InputInterface $input = null, OutputInterface $output = null) | ||
{ | ||
return $this->getSubject()->run($input, $output); | ||
} | ||
|
||
/** | ||
* Get subject | ||
* | ||
* @return Cli | ||
*/ | ||
private function getSubject(): Cli | ||
{ | ||
return $this->subject; | ||
} | ||
|
||
/** | ||
* Inject additional DI configuration | ||
* | ||
* @param Cli $cli | ||
* @return bool | ||
* @throws LocalizedException | ||
* @throws \ReflectionException | ||
*/ | ||
private function injectDiConfiguration(Cli $cli): bool | ||
{ | ||
$diPreferences = $this->getDiPreferences(); | ||
if ($diPreferences) { | ||
$object = new \ReflectionObject($cli); | ||
|
||
$attribute = $object->getProperty('objectManager'); | ||
$attribute->setAccessible(true); | ||
|
||
/** @var ObjectManagerInterface $objectManager */ | ||
$objectManager = $attribute->getValue($cli); | ||
$objectManager->configure($diPreferences); | ||
|
||
$attribute->setAccessible(false); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
/** | ||
* Get additional DI preferences | ||
* | ||
* @return array|array[] | ||
* @throws LocalizedException | ||
* @SuppressWarnings(PHPMD.Superglobals) | ||
*/ | ||
private function getDiPreferences(): array | ||
{ | ||
$diPreferences = []; | ||
$diPreferencesPath = $_SERVER['TESTS_BASE_DIR'] . '/etc/di/preferences/cli/'; | ||
|
||
$preferenceFiles = glob($diPreferencesPath . '*.php'); | ||
|
||
foreach ($preferenceFiles as $file) { | ||
if (!is_readable($file)) { | ||
throw new LocalizedException(__("'%1' is not readable file.", $file)); | ||
} | ||
$diPreferences = array_replace($diPreferences, include $file); | ||
} | ||
|
||
return $diPreferences ? ['preferences' => $diPreferences] : $diPreferences; | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
...tegration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
return [ | ||
'\Magento\Framework\Mview\TriggerCleaner' => '\Magento\TestFramework\Mview\DummyTriggerCleaner', | ||
]; |
Oops, something went wrong.