function CommentLinksAlterTest::testCommentLinksAlter

Same name in other branches
  1. 9 core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php \Drupal\Tests\comment\Functional\CommentLinksAlterTest::testCommentLinksAlter()
  2. 8.9.x core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php \Drupal\Tests\comment\Functional\CommentLinksAlterTest::testCommentLinksAlter()
  3. 10 core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php \Drupal\Tests\comment\Functional\CommentLinksAlterTest::testCommentLinksAlter()

Tests comment links altering.

File

core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php, line 37

Class

CommentLinksAlterTest
Tests comment links altering.

Namespace

Drupal\Tests\comment\Functional

Code

public function testCommentLinksAlter() : void {
    $this->drupalLogin($this->webUser);
    $comment_text = $this->randomMachineName();
    $subject = $this->randomMachineName();
    $this->postComment($this->node, $comment_text, $subject);
    $this->drupalGet('node/' . $this->node
        ->id());
    $this->assertSession()
        ->linkExists('Report');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.