CommentLinksAlterTest.php in Drupal 9
File
core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php
View source
<?php
namespace Drupal\Tests\comment\Functional;
class CommentLinksAlterTest extends CommentTestBase {
protected static $modules = [
'comment_test',
];
protected $defaultTheme = 'stark';
protected function setUp() : void {
parent::setUp();
$this->container
->get('state')
->set('comment_test_links_alter_enabled', TRUE);
}
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');
}
}