yield 'Test net default currency' =>
['default', CartPrice::TAX_STATE_NET, 2.0, 0.2
];
yield 'Test net usd currency' =>
['usd', CartPrice::TAX_STATE_NET, 1.0, 0.1
];
} private function rampUpPriceFacade(IdsCollection
$ids, string
$currencyKey, string
$taxState): CheapestPriceFacade
{ $entity =
new class() extends Entity
{ protected CalculatedPrice
$calculatedPrice;
};
$quantityCalculator =
new QuantityPriceCalculator( new GrossPriceCalculator(new TaxCalculator(),
new CashRounding()),
new NetPriceCalculator(new TaxCalculator(),
new CashRounding()) );
$stubs =
new ScriptPriceStubs( // not necessary for this test
$this->
createMock(Connection::
class),
$quantityCalculator,
new PercentagePriceCalculator(new CashRounding(),
$quantityCalculator,
new PercentageTaxRuleBuilder()),
);
$entity->
assign(['calculatedPrice' =>
new CalculatedPrice(10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection())]);