protected function CommentCacheTagsTest::getAdditionalCacheTagsForEntity in Drupal 9
Same name and namespace in other branches
- 8 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 153
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',
];
}