@@ -38,11 +38,6 @@ class ModuleResolver
38
38
*/
39
39
const REGISTRAR_CLASS = "\Magento\Framework\Component\ComponentRegistrar " ;
40
40
41
- /**
42
- * Magento Directory Structure Name Prefix
43
- */
44
- const MAGENTO_PREFIX = "Magento_ " ;
45
-
46
41
/**
47
42
* Enabled modules.
48
43
*
@@ -278,7 +273,6 @@ private function globRelevantPaths($testPath, $pattern)
278
273
279
274
foreach ($ relevantPaths as $ codePath ) {
280
275
$ mainModName = array_search ($ codePath , $ allComponents ) ?: basename (str_replace ($ pattern , '' , $ codePath ));
281
- $ mainModName = str_replace (self ::MAGENTO_PREFIX , "" , $ mainModName );
282
276
$ modulePaths [$ mainModName ][] = $ codePath ;
283
277
284
278
if (MftfApplicationConfig::getConfig ()->verboseEnabled ()) {
@@ -340,17 +334,16 @@ private function getEnabledDirectoryPaths($enabledModules, $allModulePaths)
340
334
{
341
335
$ enabledDirectoryPaths = [];
342
336
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 ])) {
346
338
continue ;
347
- } elseif (isset ($ this ->knownDirectories [$ moduleShortName ]) && !isset ($ allModulePaths [$ moduleShortName ])) {
339
+ } elseif (isset ($ this ->knownDirectories [$ magentoModuleName ])
340
+ && !isset ($ allModulePaths [$ magentoModuleName ])) {
348
341
LoggingUtil::getInstance ()->getLogger (ModuleResolver::class)->warn (
349
342
"Known directory could not match to an existing path. " ,
350
- ['knownDirectory ' => $ moduleShortName ]
343
+ ['knownDirectory ' => $ magentoModuleName ]
351
344
);
352
345
} else {
353
- $ enabledDirectoryPaths [$ moduleShortName ] = $ allModulePaths [$ moduleShortName ];
346
+ $ enabledDirectoryPaths [$ magentoModuleName ] = $ allModulePaths [$ magentoModuleName ];
354
347
}
355
348
}
356
349
return $ enabledDirectoryPaths ;
0 commit comments