Skip to content

Commit 0794a74

Browse files
authored
MQE-768: Framework cannot depend on relative file structure to execute tests
- MFTF and MFTF Tests can now interact with one another properly even if installed via composer. - Pathing and anchoring is now done via composer autoload file checking.
1 parent bf24553 commit 0794a74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dev/tests/_bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
defined('TESTS_BP') || define('TESTS_BP', __DIR__);
4444
defined('TESTS_MODULE_PATH') || define('TESTS_MODULE_PATH', TESTS_BP . $RELATIVE_TESTS_MODULE_PATH);
45+
defined('MAGENTO_BP') || define('MAGENTO_BP', __DIR__);
4546

4647
$utilDir = DIRECTORY_SEPARATOR . 'Util'. DIRECTORY_SEPARATOR . '*.php';
4748

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,8 @@ private function aggregateTestModulePaths()
223223
{
224224
$allModulePaths = [];
225225

226-
// TODO update these paths when we switch a composer based pathing
227226
// Define the Module paths from app/code
228-
$appCodePath = dirname(dirname(dirname(PROJECT_ROOT)))
227+
$appCodePath = MAGENTO_BP
229228
. DIRECTORY_SEPARATOR
230229
. 'app' . DIRECTORY_SEPARATOR
231230
. 'code' . DIRECTORY_SEPARATOR;
@@ -234,7 +233,7 @@ private function aggregateTestModulePaths()
234233
$modulePath = defined('TESTS_MODULE_PATH') ? TESTS_MODULE_PATH : TESTS_BP;
235234

236235
// Define the Module paths from vendor modules
237-
$vendorCodePath = dirname(dirname(dirname(PROJECT_ROOT)))
236+
$vendorCodePath = PROJECT_ROOT
238237
. DIRECTORY_SEPARATOR
239238
. 'vendor' . DIRECTORY_SEPARATOR;
240239

0 commit comments

Comments
 (0)