diff --git a/core/modules/comment/src/Tests/CommentTitleTest.php b/core/modules/comment/src/Tests/CommentTitleTest.php index 4a58a23..82fcf70 100644 --- a/core/modules/comment/src/Tests/CommentTitleTest.php +++ b/core/modules/comment/src/Tests/CommentTitleTest.php @@ -67,6 +67,6 @@ public function testCommentPopulatedTitles() { // Tests that the comment's title has the correct link. $comment_permalink = $this->cssSelect('.permalink'); $comment_permalink = (string)$comment_permalink[0]['href']; - $this->assertTrue((bool)preg_match('/\/comment\/' . $comment1->id() . '+#comment\-' . $comment1->id() . '+/', $comment_permalink), 'The comment\'s title has the correct link'); + $this->assertTrue('/comment/' . $comment1->id() . '#comment-' . $comment1->id() == $comment_permalink, 'The comment\'s title has the correct link'); } }