Skip to content

Commit 8c44d2a

Browse files
authored
Merge branch 'develop' into MQE-1336
2 parents 0ead9ed + 1f8735d commit 8c44d2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ private function globRelevantPaths($testPath, $pattern)
272272
$allComponents = $this->getRegisteredModuleList();
273273

274274
foreach ($relevantPaths as $codePath) {
275+
// Reduce magento/app/code/Magento/AdminGws/<pattern> to magento/app/code/Magento/AdminGws to read symlink
276+
// Symlinks must be resolved otherwise they will not match Magento's filepath to the module
277+
$potentialSymlink = str_replace(DIRECTORY_SEPARATOR . $pattern, "", $codePath);
278+
if (is_link($potentialSymlink)) {
279+
$codePath = readlink($potentialSymlink) . DIRECTORY_SEPARATOR . $pattern;
280+
}
281+
275282
$mainModName = array_search($codePath, $allComponents) ?: basename(str_replace($pattern, '', $codePath));
276283
$modulePaths[$mainModName][] = $codePath;
277284

0 commit comments

Comments
 (0)