You are here

protected function CacheInvalidationOnGroupChangeTest::generateCid in Organic groups 8

Generates a cache ID for a group content listing of the given group.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $group: The group for which to generate a group content listing cache ID.

Return value

string The cache ID.

2 calls to CacheInvalidationOnGroupChangeTest::generateCid()
CacheInvalidationOnGroupChangeTest::getCachedData in tests/src/Kernel/Entity/CacheInvalidationOnGroupChangeTest.php
Returns the cached group content listing for a given group, if available.
CacheInvalidationOnGroupChangeTest::populateCache in tests/src/Kernel/Entity/CacheInvalidationOnGroupChangeTest.php
Caches a listing of group content that belongs to the given group.

File

tests/src/Kernel/Entity/CacheInvalidationOnGroupChangeTest.php, line 161

Class

CacheInvalidationOnGroupChangeTest
Tests if group content listings are invalidated when group audience changes.

Namespace

Drupal\Tests\og\Kernel\Entity

Code

protected function generateCid(ContentEntityInterface $group) : string {
  return implode(':', [
    'my_group_content_listing',
    $group
      ->id(),
  ]);
}