function CommentCacheTagsTest::setUp
Overrides EntityCacheTagsTestBase::setUp
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentCacheTagsTest.php, line 55
Class
- CommentCacheTagsTest
- Tests the Comment entity's cache tags.
Namespace
Drupal\Tests\comment\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Give anonymous users permission to view comments, so that we can verify
// the cache tags of cached versions of comment pages.
$user_role = Role::load(RoleInterface::ANONYMOUS_ID);
$user_role->grantPermission('access comments');
$user_role->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.