You are here

protected function NodeCacheTagsTest::getAdditionalCacheTagsForEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()
  2. 10 core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()

Each node must have an author.

Overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity

File

core/modules/node/tests/src/Functional/NodeCacheTagsTest.php, line 69

Class

NodeCacheTagsTest
Tests the Node entity's cache tags.

Namespace

Drupal\Tests\node\Functional

Code

protected function getAdditionalCacheTagsForEntity(EntityInterface $node) {
  return [
    'user:' . $node
      ->getOwnerId(),
    'user_view',
  ];
}