public function BackendChainImplementationUnitTest::testRemoveBin in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php \Drupal\Tests\Core\Cache\BackendChainImplementationUnitTest::testRemoveBin()
- 10 core/tests/Drupal/Tests/Core/Cache/BackendChainImplementationUnitTest.php \Drupal\Tests\Core\Cache\BackendChainImplementationUnitTest::testRemoveBin()
Test that removing bin propagates to all backends.
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ BackendChainImplementationUnitTest.php, line 291
Class
- BackendChainImplementationUnitTest
- Unit test of backend chain implementation specifics.
Namespace
Drupal\Tests\Core\CacheCode
public function testRemoveBin() {
$chain = new BackendChain();
for ($i = 0; $i < 3; $i++) {
$backend = $this
->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
$backend
->expects($this
->once())
->method('removeBin');
$chain
->appendBackend($backend);
}
$chain
->removeBin();
}