You are here

protected function FeedCacheTagsTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php \Drupal\Tests\aggregator\Functional\FeedCacheTagsTest::setUp()

Overrides EntityCacheTagsTestBase::setUp

File

core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php, line 30

Class

FeedCacheTagsTest
Tests the Feed entity's cache tags.

Namespace

Drupal\Tests\aggregator\Functional

Code

protected function setUp() {
  parent::setUp();

  // Give anonymous users permission to access feeds, so that we can verify
  // the cache tags of cached versions of feeds.
  $user_role = Role::load(RoleInterface::ANONYMOUS_ID);
  $user_role
    ->grantPermission('access news feeds');
  $user_role
    ->save();
}