'stateId' =>
$this->
getStateId(),
'currencyFactor' => 1,
'orderDateTime' =>
new \
DateTime(),
'price' =>
json_decode(json_encode(new CartPrice(1, 1, 1,
new CalculatedTaxCollection(),
new TaxRuleCollection(), CartPrice::TAX_STATE_FREE
), \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
),
'shippingCosts' =>
json_decode(json_encode(new CalculatedPrice(1, 1,
new CalculatedTaxCollection(),
new TaxRuleCollection()), \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
),
];
$this->
getContainer()->
get('order.repository'
) ->
create([$order], Context::
createDefaultContext());
$this->
getContainer()->
get(Connection::
class) ->
executeStatement('UPDATE `order` SET total_rounding = NULL WHERE id = :id',
['id' =>
$ids->
getBytes('order'
)]);
$rounding =
$this->
getContainer()->
get(Connection::
class) ->
fetchOne('SELECT total_rounding FROM `order` WHERE id = :id',
['id' =>
$ids->
getBytes('order'
)]);
static::
assertNull($rounding);
$migration =
new Migration1618900427FixTotalRounding();
$migration->
update($this->
getContainer()->
get(Connection::
class));
$rounding =
$this->
getContainer()->
get(Connection::
class) ->
fetchOne('SELECT total_rounding FROM `order` WHERE id = :id',
['id' =>
$ids->
getBytes('order'
)]);