Skip to content

Commit 185f9d0

Browse files
committed
TASK: Stabilize criterion hashes in tests
1 parent f3737f0 commit 185f9d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Integration/EventStoreTestBase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,15 @@ private static function eventEnvelopeToArray(array $keys, EventEnvelope $eventEn
398398
if ($unsupportedKeys !== []) {
399399
throw new InvalidArgumentException(sprintf('Invalid key(s) "%s" for expected event. Allowed keys are: "%s"', implode('", "', $unsupportedKeys), implode('", "', $supportedKeys)), 1684668588);
400400
}
401+
$criterionHashes = $eventEnvelope->criterionHashes->toStringArray();
402+
sort($criterionHashes);
401403
$actualAsArray = [
402404
'id' => $eventEnvelope->event->id->value,
403405
'type' => $eventEnvelope->event->type->value,
404406
'data' => $eventEnvelope->event->data->value,
405407
'tags' => $eventEnvelope->event->tags->toSimpleArray(),
406408
'sequenceNumber' => $eventEnvelope->sequenceNumber->value,
407-
'criteria' => $eventEnvelope->criterionHashes->toStringArray(),
409+
'criteria' => $criterionHashes,
408410
];
409411
foreach (array_diff($supportedKeys, $keys) as $unusedKey) {
410412
unset($actualAsArray[$unusedKey]);

0 commit comments

Comments
 (0)