Skip to content

Commit ffe8895

Browse files
committed
MQE-1650: Update MFTF configuration to read Test entities from new location
1 parent b023da8 commit ffe8895

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Util/ModulePathExtractorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ class ModulePathExtractorTest extends MagentoTestCase
1818
* @var array
1919
*/
2020
private $mockTestModulePaths = [
21-
'Magento_ModuleA' => ['/base/path/app/code/Magento/ModuleA/Test/Mftf'],
22-
'VendorB_ModuleB' => ['/base/path/app/code/VendorB/ModuleB/Test/Mftf'],
23-
'Magento_ModuleC' => ['/base/path/dev/tests/acceptance/tests/functional/Magento/ModuleCTest'],
24-
'VendorD_ModuleD' => ['/base/path/dev/tests/acceptance/tests/functional/VendorD/ModuleDTest'],
25-
'SomeModuleE' => ['/base/path/dev/tests/acceptance/tests/functional/FunctionalTest/SomeModuleE'],
26-
'Magento_ModuleF' => ['/base/path/vendor/magento/module-modulef/Test/Mftf'],
27-
'VendorG_ModuleG' => ['/base/path/vendor/vendorg/module-moduleg-test'],
21+
'Magento_ModuleA' => '/base/path/app/code/Magento/ModuleA/Test/Mftf',
22+
'VendorB_ModuleB' => '/base/path/app/code/VendorB/ModuleB/Test/Mftf',
23+
'Magento_ModuleC' => '/base/path/dev/tests/acceptance/tests/functional/Magento/ModuleCTest',
24+
'VendorD_ModuleD' => '/base/path/dev/tests/acceptance/tests/functional/VendorD/ModuleDTest',
25+
'SomeModuleE' => '/base/path/dev/tests/acceptance/tests/functional/FunctionalTest/SomeModuleE',
26+
'Magento_ModuleF' => '/base/path/vendor/magento/module-modulef/Test/Mftf',
27+
'VendorG_ModuleG' => '/base/path/vendor/vendorg/module-moduleg-test',
2828
];
2929

3030
/**

src/Magento/FunctionalTestingFramework/Util/ModulePathExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ private function extractKeyByPath($path)
9191
}
9292
$paths = array_slice($paths, 0, count($paths)-2);
9393
$shortenedPath = implode(DIRECTORY_SEPARATOR, $paths);
94-
foreach ($this->testModulePaths as $key => $pathArr) {
95-
if (isset($pathArr[0]) && $pathArr[0] == $shortenedPath) {
94+
foreach ($this->testModulePaths as $key => $keyValue) {
95+
if ( $keyValue == $shortenedPath) {
9696
return $key;
9797
}
9898
}

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ private function flipAndFilterArray($objectArray, $filterArray = null)
301301
|| (is_array($filterArray) && in_array($modules[0], $filterArray))
302302
|| isset($this->knownDirectories[$modules[0]])) {
303303
if (strpos($modules[0], '_') === false) {
304-
$modules[0] = $this->getPossibleVendorName($path);
304+
$modules[0] = $this->getPossibleVendorName($path) . '_' . $modules[0];
305305
}
306306
$flippedArray[$modules[0]] = $path;
307307
}

0 commit comments

Comments
 (0)