Skip to content

Commit e0a1b76

Browse files
committed
ACQE-5843 : Fix static check failure
1 parent 9b5bc9a commit e0a1b76

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
252252
// check test dependencies log command
253253
if (!empty($log)) {
254254
if ($log === "testEntityJson") {
255-
$this->getTestEntityJson($tests, $filterList ??[]);
255+
$this->getTestEntityJson($filterList ??[], $tests);
256256
$testDependencyFileLocation = self::TEST_DEPENDENCY_FILE_LOCATION_EMBEDDED;
257257
if (isset($_ENV['MAGENTO_BP'])) {
258258
$testDependencyFileLocation = self::TEST_DEPENDENCY_FILE_LOCATION_STANDALONE;
@@ -395,21 +395,22 @@ private function parseConfigParallelOptions($time, $groups)
395395
* @throws TestFrameworkException
396396
* @throws XmlException|FastFailException
397397
*/
398-
private function getTestEntityJson(array $tests = [], $filterList)
398+
private function getTestEntityJson($filterList, array $tests = [])
399399
{
400400
$testDependencies = $this->getTestDependencies($filterList, $tests);
401401
$this->array2Json($testDependencies);
402402
}
403403

404404
/**
405405
* Function responsible for getting test dependencies in array
406+
* @param array $filterList
406407
* @param array $tests
407408
* @return array
408409
* @throws FastFailException
409410
* @throws TestFrameworkException
410411
* @throws XmlException
411412
*/
412-
public function getTestDependencies($filterList, array $tests = []): array
413+
public function getTestDependencies(array $filterList, array $tests = []): array
413414
{
414415
$this->scriptUtil = new ScriptUtil();
415416
$this->testDependencyUtil = new TestDependencyUtil();
@@ -442,7 +443,11 @@ public function getTestDependencies($filterList, array $tests = []): array
442443
}
443444

444445
list($testDependencies, $extendedTestMapping) = $this->findTestDependentModule($testXmlFiles);
445-
return $this->testDependencyUtil->mergeDependenciesForExtendingTests($testDependencies, $filterList, $extendedTestMapping);
446+
return $this->testDependencyUtil->mergeDependenciesForExtendingTests(
447+
$testDependencies,
448+
$filterList,
449+
$extendedTestMapping
450+
);
446451
}
447452

448453
/**

src/Magento/FunctionalTestingFramework/Util/Script/TestDependencyUtil.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,15 @@ public function getModuleName(string $filePath, array $moduleNameToPath): ?strin
144144
/**
145145
* Return array of merge test modules and file path with same test name.
146146
* @param array $testDependencies
147+
* @param array $filterList
147148
* @param array $extendedTestMapping
148149
* @return array
149150
*/
150-
public function mergeDependenciesForExtendingTests(array $testDependencies, $filterList, array $extendedTestMapping = []): array
151-
{
151+
public function mergeDependenciesForExtendingTests(
152+
array $testDependencies,
153+
array $filterList,
154+
array $extendedTestMapping = []
155+
): array {
152156
$temp_array = array_reverse(array_column($testDependencies, "test_name"), true);
153157
if (!empty($extendedTestMapping)) {
154158
foreach ($extendedTestMapping as $value) {

0 commit comments

Comments
 (0)