$shippingMethod->
setTaxType(ShippingMethodEntity::TAX_TYPE_AUTO
);
$deliveryDate =
new DeliveryDate(new \
DateTime(),
new \
DateTime());
$delivery =
new Delivery( new DeliveryPositionCollection(),
$deliveryDate,
$shippingMethod,
new ShippingLocation(new CountryEntity(), null, null
),
new CalculatedPrice(10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection()) );
$originalCart->
setDeliveries(new DeliveryCollection([$delivery]));
$calculatedCart =
new Cart('calculated'
);
$lineItem =
new LineItem('test', LineItem::PRODUCT_LINE_ITEM_TYPE
);
$lineItem->
setDeliveryInformation(new DeliveryInformation(5, 0, false
));
$lineItem->
setPrice(new CalculatedPrice(5.0, 5.0,
new CalculatedTaxCollection([ new CalculatedTax(5, 19, 5
),
]),
new TaxRuleCollection()));
$calculatedCart->
setLineItems(new LineItemCollection([$lineItem]));
$cartBehavior =
new CartBehavior([DeliveryProcessor::SKIP_DELIVERY_PRICE_RECALCULATION => true
]);