Skip to content

Commit 2bcb74c

Browse files
committed
ACQE-4973 | Fix cyclometry complexity checks
1 parent 12dc690 commit 2bcb74c

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php

+14-8
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ function (TestResult $testResult) {
163163
$this->addTestsInSuites($lifecycle, $cest);
164164
}
165165

166+
/**
167+
* Function to add test under the suites
168+
*
169+
* @param string $group
170+
* @return void
171+
*/
166172
private function addTestsInSuites($lifecycle, $cest): void
167173
{
168174
$groupName = null;
@@ -172,16 +178,16 @@ private function addTestsInSuites($lifecycle, $cest): void
172178
}
173179
$lifecycle->updateTest(
174180
function (TestResult $testResult) use ($groupName, $cest) {
175-
$labels = $testResult->getLabels();
176-
foreach ($labels as $label) {
177-
if ($groupName !== null && $label->getName() === "parentSuite") {
178-
$label->setValue(sprintf('%s\%s', $label->getValue(), $groupName));
179-
}
180-
if ($label->getName() === "package") {
181-
$label->setValue($cest->getReportFields()['class']);
181+
$labels = $testResult->getLabels();
182+
foreach ($labels as $label) {
183+
if ($groupName !== null && $label->getName() === "parentSuite") {
184+
$label->setValue(sprintf('%s\%s', $label->getValue(), $groupName));
185+
}
186+
if ($label->getName() === "package") {
187+
$label->setValue($cest->getReportFields()['class']);
188+
}
182189
}
183190
}
184-
}
185191
);
186192
}
187193

0 commit comments

Comments
 (0)