date)->toBe('2026-05-01') ->and($input->label)->toBe('Fête du Travail') ->and($input->repeatable)->toBeTrue() ->and($input->repeat_frequency)->toBe(RepeatFrequency::YEARLY); }); test('it throws when date is invalid format', function () { // GIVEN & WHEN & THEN expect(fn () => new CreatePickupExceptionInput( date: '01/05/2026', label: 'Fête du Travail', repeatable: true, repeat_frequency: RepeatFrequency::YEARLY, ))->toThrow(\InvalidArgumentException::class, 'Date must be in Y-m-d format.'); }); test('it throws when label is empty', function () { // GIVEN & WHEN & THEN expect(fn () => new CreatePickupExceptionInput( date: '2026-05-01', label: ' ', repeatable: true, repeat_frequency: RepeatFrequency::YEARLY, ))->toThrow(\InvalidArgumentException::class, 'Label cannot be empty.'); }); test('it throws when label exceeds 255 characters', function () { // GIVEN & WHEN & THEN expect(fn () => new CreatePickupExceptionInput( date: '2026-05-01', label: str_repeat('a', 256), repeatable: true, repeat_frequency: RepeatFrequency::YEARLY, ))->toThrow(\InvalidArgumentException::class, 'Label cannot exceed 255 characters.'); }); });