summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-04-19 20:27:06 +0200
committerJoas Schilling <coding@schilljs.com>2022-04-19 20:27:06 +0200
commit96f270e7143f36bd1e893a23686588604f236db1 (patch)
tree0cdb2cc172f2a45213090027c828b743dea900e7 /tests
parentfe5e6737b38d8280d333402638d541813028dd97 (diff)
Fix integration test
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index 60f0c481c..fd722589a 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -1678,6 +1678,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
$includeParents = in_array('parentMessage', $formData->getRow(0), true);
$includeReferenceId = in_array('referenceId', $formData->getRow(0), true);
$includeReactions = in_array('reactions', $formData->getRow(0), true);
+ $includeReactionsSelf = in_array('reactionsSelf', $formData->getRow(0), true);
$count = count($formData->getHash());
Assert::assertCount($count, $messages, 'Message count does not match');
@@ -1686,7 +1687,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
$messages[$i]['messageParameters'] = 'IGNORE';
}
}
- Assert::assertEquals($formData->getHash(), array_map(function ($message) use ($includeParents, $includeReferenceId, $includeReactions) {
+ Assert::assertEquals($formData->getHash(), array_map(function ($message) use ($includeParents, $includeReferenceId, $includeReactions, $includeReactionsSelf) {
$data = [
'room' => self::$tokenToIdentifier[$message['token']],
'actorType' => $message['actorType'],
@@ -1705,6 +1706,8 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
if ($includeReactions) {
$data['reactions'] = json_encode($message['reactions'], JSON_UNESCAPED_UNICODE);
+ }
+ if ($includeReactionsSelf) {
if (isset($message['reactionsSelf'])) {
$data['reactionsSelf'] = json_encode($message['reactionsSelf'], JSON_UNESCAPED_UNICODE);
} else {