$entity =
new Entity();
$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()),
);
$original =
new CalculatedPrice(10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection(new TaxRuleCollection([new TaxRule(10
)])));
// mock context to simulate currency and tax states
$context =
$this->
createMock(SalesChannelContext::
class);
// currency key will be provided, we want to test different currencies are taking into account
$context->
expects(static::
any())->
method('getCurrencyId'
)->
willReturn($ids->
get($currencyKey));
// we also want to test different tax states (gross/net)