value->toString() => new BasketProduct( id: $productId, name: 'Poulet RĂ´ti', qty: 2, unitPriceHt: Money::EUR(1200), unitDiscount: Money::EUR(0), taxRate: TaxRate::TVA_5_5, weightGrams: 1200, brand: ProductBrand::loue, incoId: new IncoId(123456), orderUnit: OrderUnit::PCE, slug: 'poulet-roti', picture: null, description: null, weightVariable: false, discountRate: DiscountRate::zero(), priceKgTtc: Money::EUR(1000), options: [], ), ]); /** @var Customer $customer */ $customer = Customer::query()->forceCreate([ 'id' => UuidHelper::v7()->toString(), 'email' => new Email('init-tunnel@example.com'), 'hashcode' => UuidHelper::v4()->toString(), ]); $shopperId = $customer->getId(); $action = new InitializeOrderTunnel($tunnelService); // WHEN $action(new InitializeOrderTunnelInput($basket, $shopperId)); // THEN $storedBuilder = $builderManager->get(); expect($storedBuilder)->toBeInstanceOf(OrderBuilderWithBasket::class) ->and($storedBuilder?->getShopperId()->equals($shopperId))->toBeTrue() ->and($storedBuilder?->getBasket()->countItems())->toBe(2); }); });