Fix repeat with named dataset arguments (#1769)

This commit is contained in:
Andrew Matia
2026-08-16 17:08:46 +03:00
committed by GitHub
parent 2c7cc1dc87
commit cfe89d20ac
4 changed files with 48 additions and 9 deletions
+22
View File
@@ -44,6 +44,28 @@ test('multiple times with repeat iterator with multiple dataset', function (stri
->toBeGreaterThan(0);
})->repeat(times: 2)->with(['a', 'b', 'c'], ['d', 'e', 'f']);
test('multiple times with named dataset arguments', function (string $name, string $email): void {
expect($name)
->toBeIn(['Taylor', 'Nuno'])
->and($email)
->toContain('@');
})->repeat(times: 2)->with([
['name' => 'Taylor', 'email' => 'taylor@laravel.com'],
['name' => 'Nuno', 'email' => 'enunomaduro@gmail.com'],
]);
test('multiple times with named dataset arguments and repeat iterator', function (string $name, string $email, int $iteration): void {
expect($name)
->toBeIn(['Taylor', 'Nuno'])
->and($email)
->toContain('@')
->and($iteration)
->toBeIn([1, 2]);
})->repeat(times: 2)->with([
['name' => 'Taylor', 'email' => 'taylor@laravel.com'],
['name' => 'Nuno', 'email' => 'enunomaduro@gmail.com'],
]);
describe('describe blocks', function (): void {
test('multiple times', function (): void {
expect(true)->toBeTrue();