You are here

public function BackendChainImplementationUnitTest::testRemoveBin in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 295
Contains \Drupal\Tests\Core\Cache\BackendChainImplementationUnitTest.

Class

BackendChainImplementationUnitTest
Unit test of backend chain implementation specifics.

Namespace

Drupal\Tests\Core\Cache

Code

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();
}