comparison core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Tests\comment\Functional;
4
5 /**
6 * Tests comment links altering.
7 *
8 * @group comment
9 */
10 class CommentLinksAlterTest extends CommentTestBase {
11
12 public static $modules = ['comment_test'];
13
14 protected function setUp() {
15 parent::setUp();
16
17 // Enable comment_test.module's hook_comment_links_alter() implementation.
18 $this->container->get('state')->set('comment_test_links_alter_enabled', TRUE);
19 }
20
21 /**
22 * Tests comment links altering.
23 */
24 public function testCommentLinksAlter() {
25 $this->drupalLogin($this->webUser);
26 $comment_text = $this->randomMachineName();
27 $subject = $this->randomMachineName();
28 $comment = $this->postComment($this->node, $comment_text, $subject);
29
30 $this->drupalGet('node/' . $this->node->id());
31
32 $this->assertLink(t('Report'));
33 }
34
35 }