You are here

protected function CacheabilityMetadataConfigOverrideIntegrationTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php \Drupal\Tests\config\Functional\CacheabilityMetadataConfigOverrideIntegrationTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php, line 33

Class

CacheabilityMetadataConfigOverrideIntegrationTest
Tests if configuration overrides correctly affect cacheability metadata.

Namespace

Drupal\Tests\config\Functional

Code

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

  // @todo If our block does not contain any content then the cache context
  //   is not bubbling up and the test fails. Remove this line once the cache
  //   contexts are properly set. See https://www.drupal.org/node/2529980.
  \Drupal::state()
    ->set('block_test.content', 'Needs to have some content');
  $this
    ->drupalLogin($this
    ->drupalCreateUser());
}