You are here

public function CommentLinksAlterTest::testCommentLinksAlter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php \Drupal\Tests\comment\Functional\CommentLinksAlterTest::testCommentLinksAlter()
  2. 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 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();
  $comment = $this
    ->postComment($this->node, $comment_text, $subject);
  $this
    ->drupalGet('node/' . $this->node
    ->id());
  $this
    ->assertSession()
    ->linkExists(t('Report'));
}