Skip to content

Commit

Permalink
Allow passing named arguments from DataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoordsij committed Jun 5, 2023
1 parent 0f36720 commit a72723d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a72723d

Please sign in to comment.