protected function ItemCacheTagsTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php \Drupal\Tests\aggregator\Functional\ItemCacheTagsTest::setUp()
Overrides EntityCacheTagsTestBase::setUp
File
- core/
modules/ aggregator/ tests/ src/ Functional/ ItemCacheTagsTest.php, line 32
Class
- ItemCacheTagsTest
- Tests the Item entity's cache tags.
Namespace
Drupal\Tests\aggregator\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Give anonymous users permission to access feeds, so that we can verify
// the cache tags of cached versions of feed items.
$user_role = Role::load(RoleInterface::ANONYMOUS_ID);
$user_role
->grantPermission('access news feeds');
$user_role
->save();
}