@@ -214,6 +214,7 @@ public function getEnabledModules()
214
214
*
215
215
* @param boolean $verbosePath
216
216
* @return array
217
+ * @throws TestFrameworkException
217
218
*/
218
219
public function getModulesPath ($ verbosePath = false )
219
220
{
@@ -226,7 +227,7 @@ public function getModulesPath($verbosePath = false)
226
227
}
227
228
228
229
// Find test modules paths by searching patterns (Test/Mftf, etc)
229
- $ allModulePaths = $ this ->aggregateTestModulePaths ();
230
+ $ allModulePaths = ModuleResolverService:: getInstance () ->aggregateTestModulePaths ();
230
231
231
232
// Find test modules paths by searching test composer.json files
232
233
$ composerBasedModulePaths = $ this ->aggregateTestModulePathsFromComposerJson ();
@@ -282,17 +283,6 @@ protected function getModuleAllowlist()
282
283
return array_map ('trim ' , explode (', ' , $ moduleAllowlist ));
283
284
}
284
285
285
- /**
286
- * Retrieves all module directories which might contain pertinent test code.
287
- *
288
- * @return array
289
- * @throws TestFrameworkException
290
- */
291
- private function aggregateTestModulePaths ()
292
- {
293
- return ModuleResolverService::getInstance ()->aggregateTestModulePaths ();
294
- }
295
-
296
286
/**
297
287
* Aggregate all code paths with test module composer json files
298
288
*
@@ -317,18 +307,7 @@ private function aggregateTestModulePathsFromComposerJson()
317
307
$ searchCodePaths [] = $ modulePath ;
318
308
}
319
309
320
- return $ this ->getComposerJsonTestModulePaths ($ searchCodePaths );
321
- }
322
-
323
- /**
324
- * Retrieve all module code paths that have test module composer json files
325
- *
326
- * @param array $codePaths
327
- * @return array
328
- */
329
- private function getComposerJsonTestModulePaths ($ codePaths )
330
- {
331
- return ModuleResolverService::getInstance ()->getComposerJsonTestModulePaths ($ codePaths );
310
+ return ModuleResolverService::getInstance ()->getComposerJsonTestModulePaths ($ searchCodePaths );
332
311
}
333
312
334
313
/**
@@ -342,18 +321,6 @@ private function aggregateTestModulePathsFromComposerInstaller()
342
321
$ magentoBaseCodePath = MAGENTO_BP ;
343
322
$ composerFile = $ magentoBaseCodePath . DIRECTORY_SEPARATOR . 'composer.json ' ;
344
323
345
- return $ this ->getComposerInstalledTestModulePaths ($ composerFile );
346
- }
347
-
348
- /**
349
- * Retrieve composer installed test module code paths
350
- *
351
- * @param string $composerFile
352
- *
353
- * @return array
354
- */
355
- private function getComposerInstalledTestModulePaths ($ composerFile )
356
- {
357
324
return ModuleResolverService::getInstance ()->getComposerInstalledTestModulePaths ($ composerFile );
358
325
}
359
326
@@ -495,7 +462,7 @@ private function mergeModulePaths($oneToOneArray, $oneToManyArray)
495
462
*/
496
463
private function normalizeModuleNames ($ codePaths )
497
464
{
498
- $ allComponents = $ this ->getRegisteredModuleList ();
465
+ $ allComponents = ModuleResolverService:: getInstance () ->getRegisteredModuleList ();
499
466
if (empty ($ allComponents )) {
500
467
return $ codePaths ;
501
468
}
@@ -571,7 +538,7 @@ private function printMagentoVersionInfo()
571
538
protected function applyCustomModuleMethods ($ modulesPath )
572
539
{
573
540
$ modulePathsResult = $ this ->removeBlocklistModules ($ modulesPath );
574
- $ customModulePaths = $ this ->getCustomModulePaths ();
541
+ $ customModulePaths = ModuleResolverService:: getInstance () ->getCustomModulePaths ();
575
542
576
543
array_map (function ($ key , $ value ) {
577
544
LoggingUtil::getInstance ()->getLogger (ModuleResolver::class)->info (
@@ -609,16 +576,6 @@ private function removeBlocklistModules($modulePaths)
609
576
return $ modulePathsResult ;
610
577
}
611
578
612
- /**
613
- * Returns an array of custom module paths defined by the user
614
- *
615
- * @return string[]
616
- */
617
- private function getCustomModulePaths ()
618
- {
619
- return ModuleResolverService::getInstance ()->getCustomModulePaths ();
620
- }
621
-
622
579
/**
623
580
* Getter for moduleBlocklist.
624
581
*
@@ -629,16 +586,6 @@ private function getModuleBlocklist()
629
586
return $ this ->moduleBlocklist ;
630
587
}
631
588
632
- /**
633
- * Calls Magento method for determining registered modules.
634
- *
635
- * @return string[]
636
- */
637
- private function getRegisteredModuleList ()
638
- {
639
- return ModuleResolverService::getInstance ()->getRegisteredModuleList ();
640
- }
641
-
642
589
/**
643
590
* Find vendor and module name from path
644
591
*
0 commit comments