diff --git a/core/modules/comment/src/Tests/Views/CommentLinksTest.php b/core/modules/comment/src/Tests/Views/CommentLinksTest.php index 90269a1..1c5bb98 100644 --- a/core/modules/comment/src/Tests/Views/CommentLinksTest.php +++ b/core/modules/comment/src/Tests/Views/CommentLinksTest.php @@ -65,7 +65,10 @@ public function testLinkApprove() { // Check if I can see the comment approve link on an unapproved comment. $approve_comment = $view->style_plugin->getField(0, 'approve_comment'); - $options = ['query' => ['destination' => '/']]; + $options = [ + 'query' => ['destination' => '/'], + 'language' => \Drupal::languageManager()->getDefaultLanguage(), + ]; $url = Url::fromRoute('comment.approve', ['comment' => $comment->id()], $options); $this->assertEqual(\Drupal::l('Approve', $url), (string) $approve_comment, 'Found a comment approve link for an unapproved comment.'); @@ -162,12 +165,13 @@ public function testLinkReply() { // Check if I can see the reply link on an approved comment. $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment'); + $options = ['language' => \Drupal::languageManager()->getDefaultLanguage()]; $url = Url::fromRoute('comment.reply', [ 'entity_type' => 'entity_test', 'entity' => $host->id(), 'field_name' => 'comment', 'pid' => $comment->id(), - ]); + ], $options); $this->assertEqual(\Drupal::l('Reply', $url), (string) $replyto_comment, 'Found the comment reply link as an admin user.'); // Check if I can see the reply link as an anonymous user.