Skip to content

Commit 14318ac

Browse files
authored
Update TestGenerator.php
1 parent 2547fb3 commit 14318ac

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,14 @@ public function throwExceptionIfDuplicateArgumentsFound(string $fileContents)
265265
}
266266
}
267267
foreach ($argArr as $key => $arrVal) {
268-
268+
if (!empty($argArr[$key + 1]) && $argArr[$key + 1] === $arrVal) {
269+
$err[] = 'Duplicate argument name '.$arrVal.' not allowed in helper or actionGroup';
270+
throw new TestFrameworkException(implode(PHP_EOL, $err));
271+
}
272+
if (!empty($argArr[$key + 2]) && $argArr[$key + 2] === $arrVal) {
273+
$err[] = 'Duplicate argument name '.$arrVal.' not allowed in helper or actionGroup';
274+
throw new TestFrameworkException(implode(PHP_EOL, $err));
275+
}
269276
}
270277
}
271278

0 commit comments

Comments
 (0)