function CommentCSSTest::setUp

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

Overrides CommentTestBase::setUp

File

core/modules/comment/tests/src/Functional/CommentCSSTest.php, line 32

Class

CommentCSSTest
Tests CSS classes on comments.

Namespace

Drupal\Tests\comment\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Allow anonymous users to see comments.
    user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [
        'access comments',
        'access content',
    ]);
}

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