Skip to content

Commit 9cb452b

Browse files
committed
MQE-1782: MFTF run:group can't run test in a suite
- changed from isset to array_search - fixed static check
1 parent 2a9df73 commit 9cb452b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Console/BaseGenerateCommandTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,12 @@ public function testThreeTestOneSuiteOneGroupMix()
139139
$testOne = new TestObject('Test1', [], [], []);
140140
$testTwo = new TestObject('Test2', [], [], []);
141141
$testThree = new TestObject('Test3', [], ['group' => ['Group1']], []);
142-
$suiteOne = new SuiteObject('Suite1', ['Test1' => $testOne, 'Test2' => $testTwo, 'Test3' => $testThree], [], []);
142+
$suiteOne = new SuiteObject(
143+
'Suite1',
144+
['Test1' => $testOne, 'Test2' => $testTwo, 'Test3' => $testThree],
145+
[],
146+
[]
147+
);
143148

144149
$testArray = ['Test1' => $testOne, 'Test2' => $testTwo, 'Test3' => $testThree];
145150
$suiteArray = ['Suite1' => $suiteOne];

src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected function getGroupAndSuiteConfiguration(array $groupOrSuiteNames)
148148

149149
foreach ($testsInGroupAndInAnySuite as $testInGroupAndInAnySuite) {
150150
$suiteName = $testsInSuites[$testInGroupAndInAnySuite][0];
151-
if (isset($result['suites'][$suiteName])) {
151+
if (array_search($suiteName, $suites) !== false) {
152152
// Suite is already being called to run in its entirety, do not filter list
153153
continue;
154154
}

0 commit comments

Comments
 (0)