function TourCacheTagsTest::setUp

Same name and namespace in other branches
  1. 8.9.x core/modules/tour/tests/src/Functional/TourCacheTagsTest.php \Drupal\Tests\tour\Functional\TourCacheTagsTest::setUp()
  2. 10 core/modules/tour/tests/src/Functional/TourCacheTagsTest.php \Drupal\Tests\tour\Functional\TourCacheTagsTest::setUp()
  3. 11.x core/modules/tour/tests/src/Functional/TourCacheTagsTest.php \Drupal\Tests\tour\Functional\TourCacheTagsTest::setUp()

Overrides PageCacheTagsTestBase::setUp

File

core/modules/tour/tests/src/Functional/TourCacheTagsTest.php, line 31

Class

TourCacheTagsTest
Tests the Tour entity's cache tags.

Namespace

Drupal\Tests\tour\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Give anonymous users permission to view nodes, so that we can verify the
    // cache tags of cached versions of node pages.
    Role::load(RoleInterface::ANONYMOUS_ID)->grantPermission('access tour')
        ->save();
}

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