public function CommentAttributesTest::testCommentRdfAuthorMarkup in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rdf/src/Tests/CommentAttributesTest.php \Drupal\rdf\Tests\CommentAttributesTest::testCommentRdfAuthorMarkup()
Tests comment author link markup has not been broken by RDF.
File
- core/
modules/ rdf/ src/ Tests/ CommentAttributesTest.php, line 150 - Contains \Drupal\rdf\Tests\CommentAttributesTest.
Class
- CommentAttributesTest
- Tests the RDFa markup of comments.
Namespace
Drupal\rdf\TestsCode
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 profiles so the profile link shows up.
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, [
'access user profiles',
]);
$this
->drupalLogin($this->webUser);
// Ensure that the author link still works properly after the author output
// is modified by the RDF module.
$this
->drupalGet('node/' . $this->node
->id());
$this
->assertLink($this->webUser
->getUsername());
$this
->assertLinkByHref('user/' . $this->webUser
->id());
}