/**
* @dataProvider priceProvider
*/
public function testCalculate(float
$discountIn, float
$packageSum, float
$discountOut): void
{ $context = Generator::
createSalesChannelContext();
$rounding =
new CashRounding();
$taxCalculator =
new TaxCalculator();
$calculator =
new AbsolutePriceCalculator( new QuantityPriceCalculator( new GrossPriceCalculator($taxCalculator,
$rounding),
new NetPriceCalculator($taxCalculator,
$rounding),
),
new PercentageTaxRuleBuilder() );
$discountCalculator =
new DiscountAbsoluteCalculator($calculator);
$priceDefinition =
new AbsolutePriceDefinition($discountIn);
$discount =
new DiscountLineItem('foo',
$priceDefinition,
['discountScope' => 'foo', 'discountType' => 'bar'
], null
);