$this->
assertNotEmpty($bins, 'Cache::getBins() returned bins to flush.'
);
foreach ($bins as $bin =>
$cache_backend) { $cid = 'test_cid_clear' .
$bin;
$cache_backend->
set($cid,
$this->defaultValue
);
} // Remove all caches then make sure that they are cleared.
drupal_flush_all_caches();
foreach ($bins as $bin =>
$cache_backend) { $cid = 'test_cid_clear' .
$bin;
$this->
assertFalse($this->
checkCacheExists($cid,
$this->defaultValue,
$bin),
new FormattableMarkup('All cache entries removed from @bin.',
['@bin' =>
$bin]));
} }}