inco)->toBe($inco) ->and($input->ingredients)->toBe('Poulet, sel') ->and($input->preparation)->toBe('Au four') ->and($input->servings)->toBe('4 pers') ->and($input->allergens)->toBe('Aucun') ->and($input->selling_argument)->toBe('Top qualité') ->and($input->nutriscore)->toBe(Nutriscore::B) ->and($input->nutriscore_args)->toBe('Faible teneur en sel') ->and($input->nutrition)->toBe($nutrition); }); test('it throws when servings exceeds 20 characters', function () { // GIVEN $inco = new ProductInco(); // WHEN & THEN expect(fn () => new UpdateProductIncoInput( inco: $inco, servings: str_repeat('a', 21), ))->toThrow(\InvalidArgumentException::class, 'Servings cannot exceed 20 characters.'); }); });