Commit 1a24063d authored by alexpott's avatar alexpott

Issue #2079857 by herom, mrsinguyen, martin107, simanjan, sandipmkhairnar:...

Issue #2079857 by herom, mrsinguyen, martin107, simanjan, sandipmkhairnar: BackendChain::removeBin() is broken.
parent b29afc17
......@@ -228,7 +228,7 @@ public function isEmpty() {
*/
public function removeBin() {
foreach ($this->backends as $backend) {
$this->removeBin();
$backend->removeBin();
}
}
......
......@@ -307,4 +307,18 @@ public function testDeleteTagsPropagation() {
&& $this->thirdBackend->get('test_cid_clear3'),
'Cached item matching the tag was removed from all backends.');
}
/**
* Test that removing bin propagates to all backends.
*/
public function testRemoveBin() {
$chain = new BackendChain('foo');
for ($i = 0; $i < 3; $i++) {
$backend = $this->getMock('Drupal\Core\Cache\CacheBackendInterface');
$backend->expects($this->once())->method('removeBin');
$chain->appendBackend($backend);
}
$chain->removeBin();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment