Skip to content

Commit e40f758

Browse files
committed
MQE-1963: Update XSD Schema to verify that file has only single entity
1 parent 4ffefa7 commit e40f758

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class SuiteObjectExtractor extends BaseObjectExtractor
2424
const INCLUDE_TAG_NAME = 'include';
2525
const EXCLUDE_TAG_NAME = 'exclude';
2626
const MODULE_TAG_NAME = 'module';
27-
const MODULE_TAG_FILE_ATTRIBUTE = 'file';
2827
const TEST_TAG_NAME = 'test';
2928
const GROUP_TAG_NAME = 'group';
3029

@@ -182,7 +181,6 @@ private function parseObjectHooks($parsedSuite)
182181
*/
183182
private function isSuiteEmpty($suiteHooks, $includeTests, $excludeTests)
184183
{
185-
186184
$noHooks = count($suiteHooks) == 0 ||
187185
(
188186
empty($suiteHooks['before']->getActions()) &&
@@ -221,34 +219,17 @@ private function extractTestObjectsFromSuiteRef($suiteReferences)
221219
TestObjectHandler::getInstance()->getTestsByGroup($suiteRefData[self::NAME]);
222220
break;
223221
case self::MODULE_TAG_NAME:
224-
$testObjectList = array_merge($testObjectList, $this->extractModuleAndFiles(
225-
$suiteRefData[self::NAME],
226-
$suiteRefData[self::MODULE_TAG_FILE_ATTRIBUTE] ?? null
227-
));
222+
$testObjectList = array_merge(
223+
$testObjectList,
224+
$this->resolveModulePathTestNames($suiteRefData[self::NAME])
225+
);
228226
break;
229227
}
230228
}
231229

232230
return $testObjectList;
233231
}
234232

235-
/**
236-
* Takes an array of modules/files and resolves to an array of test objects.
237-
*
238-
* @param string $moduleName
239-
* @param string $moduleFilePath
240-
* @return array
241-
* @throws \Exception
242-
*/
243-
private function extractModuleAndFiles($moduleName, $moduleFilePath)
244-
{
245-
if (empty($moduleFilePath)) {
246-
return $this->resolveModulePathTestNames($moduleName);
247-
}
248-
249-
return $this->resolveFilePathTestNames($moduleFilePath, $moduleName);
250-
}
251-
252233
/**
253234
* Takes a filepath (and optionally a module name) and resolves to a test object.
254235
*

0 commit comments

Comments
 (0)