createDemoCart example

Uuid::randomHex(),
            TestDefaults::SALES_CHANNEL,
            [
                SalesChannelContextService::CUSTOMER_ID => $customerId,
                SalesChannelContextService::PAYMENT_METHOD_ID => $paymentMethodId,
            ]
        );
        $context->setRuleIds(
            [$ruleId$context->getShippingMethod()->getAvailabilityRuleId()]
        );

        $cart = $this->createDemoCart($context);

        $cart = $this->processor->process($cart$contextnew CartBehavior());

        $id = $this->orderPersister->persist($cart$context);

        $versionId = $this->orderRepository->createVersion($id$this->context);

        static::assertTrue(Uuid::isValid($versionId));
    }

    public function testCascadeDeleteFlag(): void
    {
Home | Imprint | This part of the site doesn't use cookies.