function EntityTestTextItemNormalizerTest::getExpectedCacheContexts

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getExpectedCacheContexts()
  2. 8.9.x core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getExpectedCacheContexts()
  3. 10 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getExpectedCacheContexts()

Overrides EntityResourceTestBase::getExpectedCacheContexts

File

core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php, line 143

Class

EntityTestTextItemNormalizerTest
@group rest @group #slow

Namespace

Drupal\Tests\entity_test\Functional\Rest

Code

protected function getExpectedCacheContexts() {
    return Cache::mergeContexts([
        // The cache context set by the filter_test_cache_contexts filter.
'languages:' . LanguageInterface::TYPE_CONTENT,
        // The default cache contexts for Renderer.
'languages:' . LanguageInterface::TYPE_INTERFACE,
        'theme',
        // The cache tags set by the filter_test_cache_merge filter.
'user.permissions',
    ], parent::getExpectedCacheContexts());
}

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