File tree 3 files changed +11
-10
lines changed
dev/tests/unit/Magento/FunctionalTestFramework/Util
src/Magento/FunctionalTestingFramework 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -101,17 +101,17 @@ public function testGetModulePathsLocations()
101
101
// Define the Module paths from default TESTS_MODULE_PATH
102
102
$ modulePath = defined ('TESTS_MODULE_PATH ' ) ? TESTS_MODULE_PATH : TESTS_BP ;
103
103
104
- // Define the Module paths from vendor modules
105
- $ projectRootCodePath = PROJECT_ROOT ;
106
-
107
104
$ mockResolver ->verifyInvoked ('globRelevantPaths ' , [$ modulePath , '' ]);
108
105
$ mockResolver ->verifyInvoked (
109
106
'globRelevantPaths ' ,
110
- [$ magentoBaseCodePath , 'Test ' . DIRECTORY_SEPARATOR .'Mftf ' ]
107
+ [$ magentoBaseCodePath . DIRECTORY_SEPARATOR . " vendor " , 'Test ' . DIRECTORY_SEPARATOR .'Mftf ' ]
111
108
);
112
109
$ mockResolver ->verifyInvoked (
113
110
'globRelevantPaths ' ,
114
- [$ projectRootCodePath , 'Test ' . DIRECTORY_SEPARATOR .'Mftf ' ]
111
+ [
112
+ $ magentoBaseCodePath . DIRECTORY_SEPARATOR . "app " . DIRECTORY_SEPARATOR . "code " ,
113
+ 'Test ' . DIRECTORY_SEPARATOR .'Mftf '
114
+ ]
115
115
);
116
116
}
117
117
Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ public function initDom($xml, $filename = null)
88
88
{
89
89
$ dom = parent ::initDom ($ xml , $ filename );
90
90
91
- if ($ this ->checkFilenameSuffix ($ filename , self ::TEST_FILE_NAME_ENDING )) {
91
+ // Cannot rely on filename to ensure this file is a Test.xml
92
+ if ($ dom ->getElementsByTagName ('tests ' )->length > 0 ) {
92
93
$ testsNode = $ dom ->getElementsByTagName ('tests ' )[0 ];
93
94
$ testNodes = $ dom ->getElementsByTagName ('test ' );
94
95
$ this ->testsValidationUtil ->validateChildUniqueness (
Original file line number Diff line number Diff line change @@ -240,13 +240,13 @@ private function aggregateTestModulePaths()
240
240
$ modulePath = defined ('TESTS_MODULE_PATH ' ) ? TESTS_MODULE_PATH : TESTS_BP ;
241
241
$ modulePath = rtrim ($ modulePath , DIRECTORY_SEPARATOR );
242
242
243
- // Define the Module paths from project root
244
- $ projectRootCodePath = PROJECT_ROOT ;
243
+ $ vendorCodePath = DIRECTORY_SEPARATOR . " vendor " ;
244
+ $ appCodePath = DIRECTORY_SEPARATOR . " app " . DIRECTORY_SEPARATOR . " code " ;
245
245
246
246
$ codePathsToPattern = [
247
247
$ modulePath => '' ,
248
- $ magentoBaseCodePath => 'Test ' . DIRECTORY_SEPARATOR . 'Mftf ' ,
249
- $ projectRootCodePath => 'Test ' . DIRECTORY_SEPARATOR . 'Mftf '
248
+ $ magentoBaseCodePath . $ vendorCodePath => 'Test ' . DIRECTORY_SEPARATOR . 'Mftf ' ,
249
+ $ magentoBaseCodePath . $ appCodePath => 'Test ' . DIRECTORY_SEPARATOR . 'Mftf '
250
250
];
251
251
252
252
foreach ($ codePathsToPattern as $ codePath => $ pattern ) {
You can’t perform that action at this time.
0 commit comments