protected function MediaCacheTagsTest::getAdditionalCacheContextsForEntity in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media/tests/src/Functional/MediaCacheTagsTest.php \Drupal\Tests\media\Functional\MediaCacheTagsTest::getAdditionalCacheContextsForEntity()
Returns the additional (non-standard) cache contexts for the tested entity.
Only list cache contexts that aren't part of the required cache contexts.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be tested, as created by createEntity().
Return value
string[] An array of the additional cache contexts.
Overrides EntityCacheTagsTestBase::getAdditionalCacheContextsForEntity
See also
\Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::createEntity()
File
- core/
modules/ media/ tests/ src/ Functional/ MediaCacheTagsTest.php, line 64
Class
- MediaCacheTagsTest
- Tests the media items cache tags.
Namespace
Drupal\Tests\media\FunctionalCode
protected function getAdditionalCacheContextsForEntity(EntityInterface $media) {
return [
'timezone',
];
}