$productLineItem1->
setStackable(true
);
$productLineItem2->
setStackable(true
);
$productLineItem1->
setQuantity(1
);
$guestProductQuantity = 5;
$productLineItem2->
setQuantity($guestProductQuantity);
$previousCart->
addLineItems(new LineItemCollection([$productLineItem1,
$productLineItem2]));
$previousCart->
markUnmodified();
$cartMergedEvent =
new CartMergedEvent(new Cart('customerToken'
),
$currentContext,
$previousCart);
$subscriber->
addCartMergedNoticeFlash($cartMergedEvent);
static::
assertNotEmpty($infoFlash =
$session->
getFlashBag()->
get('info'
));
static::
assertEquals('checkout.cart-merged-hint',
$infoFlash[0
]);
} /**
* @param array<string, mixed> $salesChannelData
*/
private function createSalesChannelContext(string
$contextToken, array
$salesChannelData, ?string
$customerId = null
): SalesChannelContext
{