You are here

protected function CommentCacheTagsTest::getAdditionalCacheTagsForEntity in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/comment/src/Tests/CommentCacheTagsTest.php \Drupal\comment\Tests\CommentCacheTagsTest::getAdditionalCacheTagsForEntity()

Each comment must have a comment body, which always has a text format.

Overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity

File

core/modules/comment/src/Tests/CommentCacheTagsTest.php, line 150
Contains \Drupal\comment\Tests\CommentCacheTagsTest.

Class

CommentCacheTagsTest
Tests the Comment entity's cache tags.

Namespace

Drupal\comment\Tests

Code

protected function getAdditionalCacheTagsForEntity(EntityInterface $entity) {

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