function CacheTestBase::assertCacheRemoved

Asserts that a cache entry has been removed.

Parameters

$message: Message to display.

$cid: The cache id.

$bin: The bin the cache item was stored in.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php, line 79
Definition of Drupal\system\Tests\Cache\CacheTestBase.

Class

CacheTestBase
Provides helper methods for cache tests.

Namespace

Drupal\system\Tests\Cache

Code

function assertCacheRemoved($message, $cid = NULL, $bin = NULL) {
  if ($bin == NULL) {
    $bin = $this->default_bin;
  }
  if ($cid == NULL) {
    $cid = $this->default_cid;
  }
  $cached = cache($bin)
    ->get($cid);
  $this
    ->assertFalse($cached, $message);
}