pagination)->toBe($pagination) ->and($input->sorter)->toBe($sorter); }); it('creates PaginatedIncoSheet and PaginatedShortIncoSheet from domain entity and instantiates Output DTO', function (): void { // GIVEN $incoId = new IncoId('12345'); $incoSheet = IncoSheet::hydrate( id: $incoId, name: 'Poulet Rôti 1kg', label: 'Poulet Rôti Classe A', description: 'Poulet prêt à cuire', allegations: new Allegations(['Volaille française']), sellArguments: 'Délicieux', preparationAdvices: 'Cuire 45min', tips: null, sellFamilly: 'Boucherie', ingredients: new Ingredients(['main' => ['Viande']]), portions: null, allergens: [], brand: new IncoBrand(new BrandName('Le Gaulois'), new BrandCode('LGL01'), new ArcadiaId('1')), isSeasonal: true, weight: null, nutriscore: null, storageCondition: null, additives: [], compo: null, createdAt: null, updatedAt: null, ); $shortSheet = IncoShortSheet::hydrate( id: $incoId, name: 'Poulet Rôti 1kg', label: 'Poulet Rôti Classe A', createdAt: null, updatedAt: null, ); // WHEN $full = PaginatedIncoSheet::fromDomain($incoSheet); $short = PaginatedShortIncoSheet::fromDomain($shortSheet); $output = new Output([$full, $short], 1, 1, 10); // THEN expect($full->id)->toBe($incoId) ->and($full->name)->toBe('Poulet Rôti 1kg') ->and($short->id)->toBe($incoId) ->and($short->label)->toBe('Poulet Rôti Classe A') ->and($output->total)->toBe(1) ->and($output->incoSheets)->toHaveCount(2); }); });