Skip to content

Commit 56bfe0a

Browse files
marac19901990sebastianbergmann
authored andcommitted
fix the issue
1 parent bfe31a0 commit 56bfe0a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Framework/TestCase.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,9 +1235,19 @@ final protected function registerFailureType(string $classOrInterface): void
12351235
final protected function runTest(): mixed
12361236
{
12371237
$testArguments = array_merge($this->data, array_values($this->dependencyInput));
1238+
$positionalArgs = [];
1239+
$namedArgs = [];
1240+
1241+
foreach ($testArguments as $key => $value) {
1242+
if (is_int($key)) {
1243+
$positionalArgs[] = $value;
1244+
} else {
1245+
$namedArgs[$key] = $value;
1246+
}
1247+
}
12381248

12391249
try {
1240-
$testResult = $this->{$this->methodName}(...$testArguments);
1250+
$testResult = $this->{$this->methodName}(...$namedArgs, ...$positionalArgs);
12411251
} catch (Throwable $exception) {
12421252
if (!$this->shouldExceptionExpectationsBeVerified($exception)) {
12431253
throw $exception;

0 commit comments

Comments
 (0)