You are here

protected function EntityControllerCacheUtilsTrait::assertEmptyCaches in Apigee Edge 8

Checks whether the cache is properly cleared.

Parameters

\Drupal\apigee_edge\Entity\Controller\Cache\EntityCacheInterface $entity_cache: The entity cache implementation.

\Drupal\apigee_edge\Entity\Controller\Cache\EntityIdCacheInterface $entity_id_cache: The entity id cache implementation.

3 calls to EntityControllerCacheUtilsTrait::assertEmptyCaches()
EntityControllerCacheTest::testAppEntityControllerCache in tests/src/Kernel/EntityControllerCacheTest.php
Tests app entity controller cache.
EntityControllerCacheTest::testDeveloperEntityControllerCache in tests/src/Kernel/EntityControllerCacheTest.php
Tests developer entity controller cache.
EntityControllerCacheTest::testTeamEntityControllerCache in modules/apigee_edge_teams/tests/src/Kernel/EntityControllerCacheTest.php
Tests team entity controller cache.

File

tests/src/Traits/EntityControllerCacheUtilsTrait.php, line 59

Class

EntityControllerCacheUtilsTrait
A trait to common functions of entity controller tests.

Namespace

Drupal\Tests\apigee_edge\Traits

Code

protected function assertEmptyCaches(EntityCacheInterface $entity_cache, EntityIdCacheInterface $entity_id_cache) {
  $this
    ->assertEmpty($entity_cache
    ->getEntities());
  $this
    ->assertEmpty($entity_id_cache
    ->getIds());
  $this
    ->assertFalse($entity_cache
    ->isAllEntitiesInCache());
  $this
    ->assertFalse($entity_id_cache
    ->isAllIdsInCache());
}