@@ -38,11 +38,6 @@ class ModuleResolver
3838 */
3939 const REGISTRAR_CLASS = "\Magento\Framework\Component\ComponentRegistrar " ;
4040
41- /**
42- * Magento Directory Structure Name Prefix
43- */
44- const MAGENTO_PREFIX = "Magento_ " ;
45-
4641 /**
4742 * Enabled modules.
4843 *
@@ -278,7 +273,6 @@ private function globRelevantPaths($testPath, $pattern)
278273
279274 foreach ($ relevantPaths as $ codePath ) {
280275 $ mainModName = array_search ($ codePath , $ allComponents ) ?: basename (str_replace ($ pattern , '' , $ codePath ));
281- $ mainModName = str_replace (self ::MAGENTO_PREFIX , "" , $ mainModName );
282276 $ modulePaths [$ mainModName ][] = $ codePath ;
283277
284278 if (MftfApplicationConfig::getConfig ()->verboseEnabled ()) {
@@ -340,17 +334,16 @@ private function getEnabledDirectoryPaths($enabledModules, $allModulePaths)
340334 {
341335 $ enabledDirectoryPaths = [];
342336 foreach ($ enabledModules as $ magentoModuleName ) {
343- // Magento_Backend -> Backend or DevDocs -> DevDocs (if whitelisted has no underscore)
344- $ moduleShortName = explode ('_ ' , $ magentoModuleName )[1 ] ?? $ magentoModuleName ;
345- if (!isset ($ this ->knownDirectories [$ moduleShortName ]) && !isset ($ allModulePaths [$ moduleShortName ])) {
337+ if (!isset ($ this ->knownDirectories [$ magentoModuleName ]) && !isset ($ allModulePaths [$ magentoModuleName ])) {
346338 continue ;
347- } elseif (isset ($ this ->knownDirectories [$ moduleShortName ]) && !isset ($ allModulePaths [$ moduleShortName ])) {
339+ } elseif (isset ($ this ->knownDirectories [$ magentoModuleName ])
340+ && !isset ($ allModulePaths [$ magentoModuleName ])) {
348341 LoggingUtil::getInstance ()->getLogger (ModuleResolver::class)->warn (
349342 "Known directory could not match to an existing path. " ,
350- ['knownDirectory ' => $ moduleShortName ]
343+ ['knownDirectory ' => $ magentoModuleName ]
351344 );
352345 } else {
353- $ enabledDirectoryPaths [$ moduleShortName ] = $ allModulePaths [$ moduleShortName ];
346+ $ enabledDirectoryPaths [$ magentoModuleName ] = $ allModulePaths [$ magentoModuleName ];
354347 }
355348 }
356349 return $ enabledDirectoryPaths ;
0 commit comments