Skip to content
Snippets Groups Projects
Commit 1a24063d authored by Alex Pott's avatar Alex Pott
Browse files

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

Issue #2079857 by herom, mrsinguyen, martin107, simanjan, sandipmkhairnar: BackendChain::removeBin() is broken.
parent b29afc17
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment