-
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 #580 from magento-east/pr-2.0
[EAST] Bugfixes 2.0.11
- Loading branch information
Showing
11 changed files
with
173 additions
and
53 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
19 changes: 19 additions & 0 deletions
19
dev/tests/integration/_files/Magento/TestModuleSample/composer.json
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,19 @@ | ||
{ | ||
"name": "magento/module-sample-test", | ||
"description": "test sample module", | ||
"require": { | ||
"php": "~5.5.0|~5.6.0|~7.0.0", | ||
"magento/framework": "100.0.*", | ||
"magento/module-integration": "100.0.*" | ||
}, | ||
"type": "magento2-module", | ||
"version": "1.0", | ||
"extra": { | ||
"map": [ | ||
[ | ||
"*", | ||
"Magento/TestModuleSample" | ||
] | ||
] | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
dev/tests/integration/_files/Magento/TestModuleSample/etc/module.xml
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,11 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> | ||
<module name="Magento_TestModuleSample" setup_version="0.0.1" active="true"> | ||
</module> | ||
</config> |
12 changes: 12 additions & 0 deletions
12
dev/tests/integration/_files/Magento/TestModuleSample/registration.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,12 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
use Magento\Framework\Component\ComponentRegistrar; | ||
|
||
$registrar = new ComponentRegistrar(); | ||
if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleSample') === null) { | ||
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleSample', __DIR__); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
/** | ||
* @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) | ||
); | ||
/** @var SplFileInfo $file */ | ||
foreach ($iterator as $file) { | ||
if (!$file->isDir()) { | ||
$source = $file->getPathname(); | ||
$relativePath = substr($source, strlen($pathToCommittedTestModules)); | ||
$destination = $pathToInstalledMagentoInstanceModules . $relativePath; | ||
$targetDir = dirname($destination); | ||
if (!is_dir($targetDir)) { | ||
mkdir($targetDir, 0755, true); | ||
} | ||
copy($source, $destination); | ||
} | ||
} | ||
unset($iterator, $file); | ||
|
||
// Register the modules under '_files/' | ||
$pathPattern = $pathToInstalledMagentoInstanceModules . '/TestModule*/registration.php'; | ||
$files = glob($pathPattern, GLOB_NOSORT); | ||
if ($files === false) { | ||
throw new \RuntimeException('glob() returned error while searching in \'' . $pathPattern . '\''); | ||
} | ||
foreach ($files as $file) { | ||
include $file; | ||
} |
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
Oops, something went wrong.