public function testPayloadPercentageWithoutAdvancedPrices(): void
{ $currencyFactor = 1;
$discount =
new PromotionDiscountEntity();
$discount->
setId('P123'
);
$discount->
setType(PromotionDiscountEntity::TYPE_PERCENTAGE
);
$discount->
setValue(50
);
$discount->
setMaxValue(23.0
);
$discount->
setScope(PromotionDiscountEntity::SCOPE_CART
);
// Set promotion code to type individual
$this->promotion->
setUseIndividualCodes(true
);
$builder =
new PromotionItemBuilder();
$item =
$builder->
buildDiscountLineItem('my-code',
$this->promotion,
$discount, Defaults::CURRENCY,
$currencyFactor);
$expected =
[ 'promotionId' => 'PR-1',