$orderId =
$this->orderService->
createOrder($data,
$this->salesChannelContext
);
$criteria =
new Criteria([$orderId]);
/** @var OrderEntity $newlyCreatedOrder */
$newlyCreatedOrder =
$this->orderRepository->
search($criteria,
$this->salesChannelContext->
getContext())->
first();
static::
assertInstanceOf(OrderEntity::
class,
$newlyCreatedOrder);
static::
assertSame($orderId,
$newlyCreatedOrder->
getId());
$orderCustomer =
$newlyCreatedOrder->
getOrderCustomer();
static::
assertNotNull($orderCustomer);
static::
assertSame($vatIds,
$orderCustomer->
getVatIds());
} public function testCreateOrderSendsMail(): void
{ if (!
$this->
getContainer()->
has(AccountOrderController::
class)) { // ToDo: NEXT-16882 - Reactivate tests again
static::
markTestSkipped('Order mail tests should be fixed without storefront in NEXT-16882'
);
} $data =
new RequestDataBag(['tos' => true
]);
$this->
fillCart($this->salesChannelContext->
getToken());