->
firstId();
static::
assertNotNull($flowId);
$behavior =
new CloneBehavior([ 'eventName' => CheckoutOrderPlacedEvent::EVENT_NAME,
]);
$this->flowRepository->
clone($flowId,
$this->salesChannelContext->
getContext(), null,
$behavior);
} private function addProduct(string
$productId, int
$quantity, Cart
$cart, CartService
$cartService, SalesChannelContext
$context): Cart
{ $factory =
new ProductLineItemFactory(new PriceDefinitionFactory());
$product =
$factory->
create(['id' =>
$productId, 'referencedId' =>
$productId, 'quantity' =>
$quantity],
$context);
return $cartService->
add($cart,
$product,
$context);
} private function createDefaultSalesChannelContext(): SalesChannelContext
{ $salesChannelContextFactory =
$this->
getContainer()->
get(SalesChannelContextFactory::
class);
return $salesChannelContextFactory->
create(Uuid::
randomHex(), TestDefaults::SALES_CHANNEL,
[SalesChannelContextService::CUSTOMER_ID =>
$this->customerId
]);
}}