Skip to content

Commit f34117c

Browse files
authored
Update TestGenerator.php
1 parent aee41a8 commit f34117c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,16 @@ public function createAllTestFiles($testManifest = null, $testsToIgnore = null)
256256
* @throws TestFrameworkException
257257
*/
258258
public function throwExceptionIfDuplicateArgumentsFound(string $fileContents, string $fileName = ''): void
259-
{
259+
{
260260
$fileToArr = explode("\n", $fileContents);
261261
$argumentArray = [];
262262
$actionGroupStart = false;
263263
foreach ($fileToArr as $fileVal) {
264264
$fileVal = trim($fileVal);
265-
if ((str_starts_with($fileVal, '<actionGroup') || str_starts_with($fileVal, '<helper')) && !str_ends_with($fileVal, '/>')) {
265+
if (
266+
(str_starts_with($fileVal, '<actionGroup') || str_starts_with($fileVal, '<helper')) &&
267+
!str_ends_with($fileVal, '/>')
268+
) {
266269
$actionGroupStart = true;
267270
continue;
268271
}
@@ -274,7 +277,11 @@ public function throwExceptionIfDuplicateArgumentsFound(string $fileContents, st
274277
$size = strpos($argument, ' ', $subtringStart) - $subtringStart;
275278
$argumentName = substr($argument, $subtringStart, $size);
276279
if (in_array($argumentName, $argumentNameArray)) {
277-
$err[] = sprintf('Duplicate argument for actiongroup or helper with name: %s in test file: %s', $argumentName, $fileName);
280+
$err[] = sprintf(
281+
'Duplicate argument for actiongroup or helper with name: %s in test file: %s',
282+
$argumentName,
283+
$fileName
284+
);
278285
throw new TestFrameworkException(implode(PHP_EOL, $err));
279286
}
280287
$argumentNameArray[] = $argumentName;

0 commit comments

Comments
 (0)