Skip to content

Commit f63cd84

Browse files
committed
MQE-1124: [Github Issue] Allow running tests for modules installed in Magento instance via vendor directory.
- Specified additional error in case of bad Magento basepath
1 parent 41e332d commit f63cd84

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,13 @@ private function getModuleBlacklist()
534534
private function getRegisteredModuleList()
535535
{
536536
if (array_key_exists('MAGENTO_BP', $_ENV)) {
537-
require_once(MAGENTO_BP . "/app/autoload.php");
537+
$autoloadPath = realpath(MAGENTO_BP . "/app/autoload.php");
538+
if ($autoloadPath) {
539+
require_once($autoloadPath);
540+
} else {
541+
throw new TestFrameworkException("Magento app/autoload.php not found with given MAGENTO_BP:"
542+
. MAGENTO_BP);
543+
}
538544
}
539545

540546
try {

0 commit comments

Comments
 (0)