Improvements

This commit is contained in:
dbpolito
2026-02-11 18:09:09 -03:00
parent 6966802afc
commit b081584ab6
2 changed files with 10 additions and 1 deletions

View File

@ -360,7 +360,7 @@ trait Testable
}
$parameterType = is_string($argumentIndex)
? ($testParameterTypesByName[$argumentIndex] ?? 'mixed')
? $testParameterTypesByName[$argumentIndex]
: $testParameterTypes[$argumentIndex];
if (in_array($parameterType, [Closure::class, 'callable', 'mixed'])) {

View File

@ -533,3 +533,12 @@ test('named parameters work with bound closure returning associative array', fun
return ['name' => $this->foo, 'email' => 'test@example.com'];
},
]);
test('dataset items can mix named and sequential styles', function (string $name, string $email) {
expect($name)->toBeString();
expect($email)->toContain('@');
})->with([
['name' => 'Taylor', 'email' => 'taylor@laravel.com'],
['James', 'james@laravel.com'],
['James', 'email' => 'james@laravel.com'],
]);