diff --git a/core/modules/comment/src/Tests/CommentTitleTest.php b/core/modules/comment/src/Tests/CommentTitleTest.php index 9e59da1..4a58a23 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\/[0-9]+#comment\-[0-9]+/', $comment_permalink), 'The comment\'s title has the correct link'); + $this->assertTrue((bool)preg_match('/\/comment\/' . $comment1->id() . '+#comment\-' . $comment1->id() . '+/', $comment_permalink), 'The comment\'s title has the correct link'); } }