protected function tearDown(): void
{ // Destruct the registered backend, each test will get a fresh instance,
// properly emptying it here ensure that on persistent data backends they
// will come up empty the next test.
foreach ($this->cachebackends
as $bin =>
$cachebackend) { $this->cachebackends
[$bin]->
deleteAll();
} unset($this->cachebackends
);
$this->
tearDownCacheBackend();
parent::
tearDown();
} /**
* Tests the get and set methods of Drupal\Core\Cache\CacheBackendInterface.
*/
public function testSetGet() { $backend =
$this->
getCacheBackend();
$this->
assertFalse($backend->
get('test1'
), "Backend does not contain data for cache id test1."
);
$with_backslash =
['foo' => '\Drupal\foo\Bar'
];
$backend->
set('test1',
$with_backslash);