return $salesChannelContextFactory->
create($token, TestDefaults::SALES_CHANNEL,
$options);
} private function createOrder(string
$customerId): void
{ $this->
getContainer()->
get('order.repository'
)->
create( [[ 'id' =>
$this->ids->
create('order'
),
'itemRounding' =>
json_decode(json_encode(new CashRoundingConfig(2, 0.01, true
), \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
),
'totalRounding' =>
json_decode(json_encode(new CashRoundingConfig(2, 0.01, true
), \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
),
'orderDateTime'
=> (new \
DateTimeImmutable())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
'price' =>
new CartPrice(10, 10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection(), CartPrice::TAX_STATE_NET
),
'shippingCosts' =>
new CalculatedPrice(10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection()),
'orderCustomer' =>
[ 'customerId' =>
$customerId,
'email' => 'test@example.com',
'salutationId' =>
$this->
fetchFirstIdFromTable('salutation'
),
'firstName' => 'Max',
'lastName' => 'Mustermann',
],
'stateId' =>
$this->
fetchFirstIdFromTable('state_machine'
),
'paymentMethodId' =>
$this->
fetchFirstIdFromTable('payment_method'
),
'currencyId' => Defaults::CURRENCY,