function CommentCacheTagsTest::getAdditionalCacheTagsForEntity
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheTagsForEntity()
- 10 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheTagsForEntity()
- 11.x core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheTagsForEntity()
Each comment must have a comment body, which always has a text format.
Overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentCacheTagsTest.php, line 152
Class
- CommentCacheTagsTest
- Tests the Comment entity's cache tags.
Namespace
Drupal\Tests\comment\FunctionalCode
protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {
/** @var \Drupal\comment\CommentInterface $entity */
return [
'config:filter.format.plain_text',
'user:' . $entity->getOwnerId(),
'user_view',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.