You are here

protected function CommentCacheTagsTest::getAdditionalCacheTagsForEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php \Drupal\Tests\comment\Functional\CommentCacheTagsTest::getAdditionalCacheTagsForEntity()
  2. 10 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\Functional

Code

protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {

  /** @var \Drupal\comment\CommentInterface $entity */
  return [
    'config:filter.format.plain_text',
    'user:' . $entity
      ->getOwnerId(),
    'user_view',
  ];
}