From a72723d209daaea4428a6f7b97201c3b020ec18a Mon Sep 17 00:00:00 2001 From: Jesper Noordsij Date: Mon, 20 Feb 2023 10:32:34 +0100 Subject: [PATCH] Allow passing named arguments from DataProvider --- src/Framework/TestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index 0194036037e..b380b2a766d 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -1057,12 +1057,12 @@ final protected function registerFailureType(string $classOrInterface): void */ protected function runTest(): mixed { - $testArguments = array_merge($this->data, $this->dependencyInput); + $testArguments = array_merge($this->data, array_values($this->dependencyInput)); $this->registerMockObjectsFromTestArguments($testArguments); try { - $testResult = $this->{$this->name}(...array_values($testArguments)); + $testResult = $this->{$this->name}(...$testArguments); } catch (Throwable $exception) { if (!$this->shouldExceptionExpectationsBeVerified($exception)) { throw $exception;