['Viande de dinde (66%)']]); $brand = new IncoBrand(new BrandName('Le Gaulois'), new BrandCode('LGL01'), new ArcadiaId('504')); // WHEN $sheet = IncoSheet::builder() ->withId($id) ->withName('Poulet Rôti 1kg') ->withLabel('Poulet Rôti Classe A') ->withDescription('Poulet prêt à cuire') ->withAllegations($allegations) ->withSellArguments('Délicieux') ->withPreparationAdvices('Cuire 45min à 180°C') ->withSellFamilly('Boucherie') ->withIngredients($ingredients) ->withBrand($brand) ->withIsSeasonal(true) ->build(); // THEN expect($sheet)->toBeInstanceOf(IncoSheet::class) ->and($sheet->id())->toBe($id) ->and($sheet->name)->toBe('Poulet Rôti 1kg') ->and($sheet->label)->toBe('Poulet Rôti Classe A') ->and($sheet->description)->toBe('Poulet prêt à cuire') ->and($sheet->sellFamilly)->toBe('Boucherie') ->and($sheet->brand->name->value)->toBe('Le Gaulois') ->and($sheet->brand->code->value)->toBe('LGL01') ->and($sheet->brand->arcadiaBrandCode->value)->toBe('504') ->and($sheet->isSeasonal)->toBeTrue(); }); it('throws DomainException when required fields are missing', function (): void { // GIVEN $builder = new IncoSheetBuilder(); // WHEN expect(fn () => $builder->build()) // THEN ->toThrow(\DomainException::class, 'Cannot build IncoSheet: missing required components.'); }); });