$context =
$this->
getContainer()->
get(SalesChannelContextFactory::
class) ->
create(Uuid::
randomHex(), TestDefaults::SALES_CHANNEL
);
foreach ($cases as $i =>
$case) { // prepare currency factor calculation
$factor = 1;
if ($case->usedCurrency !== Defaults::CURRENCY
) { $factor = 1.5;
} $context->
getContext()->
assign(['currencyFactor' =>
$factor]);
$context->
getCurrency()->
setId($case->usedCurrency
);
// test different tax states
$context->
setTaxState($case->taxState
);
// create a new product for this case
$id =
$ids->
create('product-' .
$i);
$price =
[ [ 'currencyId' =>
$case->currencyId,
'gross' =>
$case->gross,