diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/src/Tests/CommentAttributesTest.php index e678de2..a4d3059 100644 --- a/core/modules/rdf/src/Tests/CommentAttributesTest.php +++ b/core/modules/rdf/src/Tests/CommentAttributesTest.php @@ -145,6 +145,25 @@ public function testNumberOfCommentsRdfaMarkup() { } /** + * Tests comment author link markup has not been broken by RDF. + */ + public function testCommentRdfAuthorMarkup() { + // Post a comment as a registered user. + $this->saveComment($this->node->id(), $this->webUser->id()); + + // Give the user access to view user information so the link shows up. + user_role_grant_permissions( + RoleInterface::AUTHENTICATED_ID, + ['access user profiles'] + ); + $this->drupalLogin($this->webUser); + + $this->drupalGet('node/' . $this->node->id()); + $this->assertLink($this->webUser->getUsername()); + $this->assertLinkByHref('user/' . $this->webUser->id()); + } + + /** * Tests if RDFa markup for meta information is present in comments. * * Tests presence of RDFa markup for the title, date and author and homepage