date->format('Y-m-d'))->toBe('2026-05-01') ->and($pickupException->label)->toBe('1er Mai') ->and($pickupException->repeatable)->toBeTrue() ->and($pickupException->repeat_frequency)->toBe(RepeatFrequency::YEARLY) ->and($pickupException->auto_updated)->toBeFalse(); expect(PickupException::query()->where('label', '1er Mai')->exists())->toBeTrue(); }); test('it throws when an invalid input is passed', function () { // GIVEN $action = new CreatePickupException(); $invalidInput = new class () implements ActionInput { }; /** @var \Closure(\App\Contracts\ActionInput): mixed $callable */ $callable = \Closure::fromCallable($action); // WHEN & THEN expect(fn () => $callable($invalidInput))->toThrow(\InvalidArgumentException::class); }); });