You are here

protected function CacheInvalidationOnGroupChangeTest::getCachedData in Organic groups 8

Returns the cached group content listing for a given group, if available.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $group: The group for which to return the cached group content listing.

Return value

false|object The cache item or FALSE on failure.

2 calls to CacheInvalidationOnGroupChangeTest::getCachedData()
CacheInvalidationOnGroupChangeTest::assertCacheNotPopulated in tests/src/Kernel/Entity/CacheInvalidationOnGroupChangeTest.php
Checks if the group content listing cache for a given group is unpopulated.
CacheInvalidationOnGroupChangeTest::assertCachePopulated in tests/src/Kernel/Entity/CacheInvalidationOnGroupChangeTest.php
Checks if the group content listing cache for a given group is populated.

File

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

Class

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

Namespace

Drupal\Tests\og\Kernel\Entity

Code

protected function getCachedData(ContentEntityInterface $group) {
  return $this->cache
    ->get($this
    ->generateCid($group));
}