pickupException)->toBe($pickupException) ->and($input->date)->toBe('2026-05-08') ->and($input->label)->toBe('Victoire 1945') ->and($input->repeatable)->toBeTrue() ->and($input->repeat_frequency)->toBe(RepeatFrequency::YEARLY); }); test('it throws when date is invalid format', function () { // GIVEN $pickupException = new PickupException(); // WHEN & THEN expect(fn () => new UpdatePickupExceptionInput( pickupException: $pickupException, date: '08/05/2026', label: 'Victoire 1945', 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 $pickupException = new PickupException(); // WHEN & THEN expect(fn () => new UpdatePickupExceptionInput( pickupException: $pickupException, date: '2026-05-08', label: ' ', repeatable: true, repeat_frequency: RepeatFrequency::YEARLY, ))->toThrow(\InvalidArgumentException::class, 'Label cannot be empty.'); }); test('it throws when label exceeds 255 characters', function () { // GIVEN $pickupException = new PickupException(); // WHEN & THEN expect(fn () => new UpdatePickupExceptionInput( pickupException: $pickupException, date: '2026-05-08', label: str_repeat('a', 256), repeatable: true, repeat_frequency: RepeatFrequency::YEARLY, ))->toThrow(\InvalidArgumentException::class, 'Label cannot exceed 255 characters.'); }); });