$this->salesChannelContext =
$salesChannelService->
get( new SalesChannelContextServiceParameters( TestDefaults::SALES_CHANNEL,
Uuid::
randomHex() ) );
} public function testCalculateDoesNotAddDiscountItemsWithoutScope(): void
{ $discountItem =
new LineItem(Uuid::
randomHex(), PromotionProcessor::LINE_ITEM_TYPE
);
$discountItems =
new LineItemCollection([$discountItem]);
$original =
new Cart(Uuid::
randomHex());
$toCalculate =
new Cart(Uuid::
randomHex());
$this->promotionCalculator->
calculate($discountItems,
$original,
$toCalculate,
$this->salesChannelContext,
new CartBehavior());
static::
assertEmpty($toCalculate->
getLineItems());
} public function testCalculateDoesNotAddDiscountItemsWithDeliveryScope(): void
{ $discountItem =
new LineItem(Uuid::
randomHex(), PromotionProcessor::LINE_ITEM_TYPE
);
$discountItem->
setPayloadValue('discountScope', PromotionDiscountEntity::SCOPE_DELIVERY
);