$contextFactory =
$this->
getContainer()->
get(SalesChannelContextFactory::
class);
$this->salesChannelContext =
$contextFactory->
create( '',
TestDefaults::SALES_CHANNEL,
[SalesChannelContextService::CUSTOMER_ID =>
$this->
createCustomer('Jon', 'Doe'
)] );
} public function testOrderDeliveryStateTransition(): void
{ $orderId =
$this->
performOrder();
// getting the id of the order delivery
$criteria =
new Criteria([$orderId]);
$criteria->
addAssociations([ 'stateMachineState',
'deliveries.stateMachineState',
'deliveries.shippingOrderAddress',
]);
/** @var OrderEntity $order */