You are here

public function CommentLinksAlterTest::testCommentLinksAlter in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php \Drupal\Tests\comment\Functional\CommentLinksAlterTest::testCommentLinksAlter()
  2. 9 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 29

Class

CommentLinksAlterTest
Tests comment links altering.

Namespace

Drupal\Tests\comment\Functional

Code

public function testCommentLinksAlter() {
  $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');
}