function CommentAnonymousTest::setUp
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentAnonymousTest.php \Drupal\Tests\comment\Functional\CommentAnonymousTest::setUp()
- 8.9.x core/modules/comment/tests/src/Functional/CommentAnonymousTest.php \Drupal\Tests\comment\Functional\CommentAnonymousTest::setUp()
- 11.x core/modules/comment/tests/src/Functional/CommentAnonymousTest.php \Drupal\Tests\comment\Functional\CommentAnonymousTest::setUp()
Overrides CommentTestBase::setUp
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentAnonymousTest.php, line 25
Class
- CommentAnonymousTest
- Tests anonymous commenting.
Namespace
Drupal\Tests\comment\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Enable anonymous and authenticated user comments.
user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [
'access comments',
'post comments',
'skip comment approval',
]);
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, [
'access comments',
'post comments',
'skip comment approval',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.