return [ 'Mixed shipping by quantity' =>
[DeliveryCalculator::CALCULATION_BY_LINE_ITEM_COUNT, 1, 100
],
'Mixed shipping by cart price' =>
[DeliveryCalculator::CALCULATION_BY_PRICE, 100, 1
],
'Mixed shipping by weight' =>
[DeliveryCalculator::CALCULATION_BY_WEIGHT, 1, 1
],
'Mixed shipping by volume' =>
[DeliveryCalculator::CALCULATION_BY_VOLUME, 1, 1
],
];
} private function buildDeliveries(LineItemCollection
$lineItems, SalesChannelContext
$context): DeliveryCollection
{ $data =
new CartDataCollection();
$data->
set(DeliveryProcessor::
buildKey($context->
getShippingMethod()->
getId()),
$context->
getShippingMethod());
$cart =
new Cart('test'
);
$cart->
setLineItems($lineItems);
return $this->
getContainer()->
get(DeliveryBuilder::
class) ->
build($cart,
$data,
$context,
new CartBehavior());
} private function createLineItem(DeliveryInformation
$deliveryInformation, CalculatedPrice
$calculatedPrice): LineItem
{ $lineItem =
new LineItem(Uuid::
randomHex(), 'product'
);