Skip to content

Commit 21b69c7

Browse files
committed
Fix tests
1 parent c240218 commit 21b69c7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Controller/Api/Tag/TagContentRetrieveApiController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function entries(
198198
try {
199199
\assert($value instanceof Entry);
200200
$this->handlePrivateContent($value);
201-
$dtos[] = $this->serializeEntry($factory->createDto($value), $this->tagLinkRepository->getTagsOfContent($value));
201+
$dtos[] = $this->serializeEntry($value, $this->tagLinkRepository->getTagsOfContent($value));
202202
} catch (AccessDeniedException $e) {
203203
continue;
204204
}
@@ -353,7 +353,7 @@ public function entryComments(
353353
try {
354354
\assert($value instanceof EntryComment);
355355
$this->handlePrivateContent($value);
356-
$dtos[] = $this->serializeEntryComment($factory->createDto($value), $this->tagLinkRepository->getTagsOfContent($value));
356+
$dtos[] = $this->serializeEntryComment($value, $this->tagLinkRepository->getTagsOfContent($value));
357357
} catch (AccessDeniedException $e) {
358358
continue;
359359
}
@@ -509,7 +509,7 @@ public function posts(
509509
try {
510510
\assert($value instanceof Post);
511511
$this->handlePrivateContent($value);
512-
$dtos[] = $this->serializePost($factory->createDto($value), $this->tagLinkRepository->getTagsOfContent($value));
512+
$dtos[] = $this->serializePost($value, $this->tagLinkRepository->getTagsOfContent($value));
513513
} catch (AccessDeniedException $e) {
514514
continue;
515515
}
@@ -665,7 +665,7 @@ public function postComments(
665665
try {
666666
\assert($value instanceof PostComment);
667667
$this->handlePrivateContent($value);
668-
$dtos[] = $this->serializePostComment($factory->createDto($value), $this->tagLinkRepository->getTagsOfContent($value));
668+
$dtos[] = $this->serializePostComment($value, $this->tagLinkRepository->getTagsOfContent($value));
669669
} catch (AccessDeniedException $e) {
670670
continue;
671671
}

tests/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ abstract class WebTestCase extends BaseWebTestCase
103103
protected const array MAGAZINE_RESPONSE_KEYS = ['magazineId', 'owner', 'icon', 'banner', 'name', 'title', 'description', 'rules', 'subscriptionsCount', 'entryCount', 'entryCommentCount', 'postCount', 'postCommentCount', 'isAdult', 'isUserSubscribed', 'isBlockedByUser', 'tags', 'badges', 'moderators', 'apId', 'apProfileId', 'serverSoftware', 'serverSoftwareVersion', 'isPostingRestrictedToMods', 'localSubscribers', 'notificationStatus', 'discoverable', 'indexable'];
104104
protected const array MAGAZINE_SMALL_RESPONSE_KEYS = ['magazineId', 'name', 'icon', 'banner', 'isUserSubscribed', 'isBlockedByUser', 'apId', 'apProfileId', 'discoverable', 'indexable'];
105105
protected const array DOMAIN_RESPONSE_KEYS = ['domainId', 'name', 'entryCount', 'subscriptionsCount', 'isUserSubscribed', 'isBlockedByUser'];
106-
protected const array POLL_KEYS = ['voterCount', 'currentUserHasVoted', 'choices'];
106+
protected const array POLL_KEYS = ['voterCount', 'endDate', 'currentUserHasVoted', 'choices'];
107107
protected const array POLL_CHOICE_KEYS = ['name', 'voteCount', 'currentUserHasVoted'];
108108

109109
protected const string KIBBY_PNG_URL_RESULT = 'a8/1c/a81cc2fea35eeb232cd28fcb109b3eb5a4e52c71bce95af6650d71876c1bcbb7.png';

0 commit comments

Comments
 (0)