'newVersionId' =>
hex2bin('00000000000000000000000000000000'
),
'liveVersionId' =>
hex2bin(Defaults::LIVE_VERSION
),
'orderId' =>
hex2bin($orderId),
],
);
// 4. Search for the document over the order number of its attached order
$documents =
$this->documentRepository->
search( (new Criteria()) ->
addFilter(new EqualsFilter('order.orderNumber',
$order->
getOrderNumber())) ->
addAssociation('order'
) ->
setTotalCountMode(Criteria::TOTAL_COUNT_MODE_EXACT
),
$this->context,
);
static::
assertCount(1,
$documents);
static::
assertEquals(1,
$documents->
getTotal());
/** @var DocumentEntity $document */
$document =
$documents->
first();
static::
assertNotNull($document->
getOrder());
static::
assertEquals('00000000000000000000000000000000',
$document->
getOrder()->
getVersionId());
}