Skip to content

Commit a245731

Browse files
authored
MQE-1350: Add support for symlinked vendor/magento modules
- Simplified fix to resolve the relative path to a full path.
1 parent 317323c commit a245731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ private function globRelevantPaths($testPath, $pattern)
276276
// Symlinks must be resolved otherwise they will not match Magento's filepath to the module
277277
$potentialSymlink = str_replace(DIRECTORY_SEPARATOR . $pattern, "", $codePath);
278278
if (is_link($potentialSymlink)) {
279-
$codePath = readlink($potentialSymlink) . DIRECTORY_SEPARATOR . $pattern;
279+
$codePath = realpath($potentialSymlink) . DIRECTORY_SEPARATOR . $pattern;
280280
}
281281

282282
$mainModName = array_search($codePath, $allComponents) ?: basename(str_replace($pattern, '', $codePath));
@@ -554,8 +554,8 @@ private function getRegisteredModuleList()
554554
}
555555
array_walk($allComponents, function (&$value) {
556556
// Magento stores component paths with unix DIRECTORY_SEPARATOR, need to stay uniform and convert
557-
$value .= '/Test/Mftf';
558557
$value = realpath($value);
558+
$value .= '/Test/Mftf';
559559
});
560560
return $allComponents;
561561
} catch (TestFrameworkException $e) {

0 commit comments

Comments
 (0)