You are here

public function ChainCacheTest::testNamespaceIsPropagatedToAllProviders in Plug 7

File

lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ChainCacheTest.php, line 54

Class

ChainCacheTest

Namespace

Doctrine\Tests\Common\Cache

Code

public function testNamespaceIsPropagatedToAllProviders() {
  $cache1 = new ArrayCache();
  $cache2 = new ArrayCache();
  $chainCache = new ChainCache(array(
    $cache1,
    $cache2,
  ));
  $chainCache
    ->setNamespace('bar');
  $this
    ->assertEquals('bar', $cache1
    ->getNamespace());
  $this
    ->assertEquals('bar', $cache2
    ->getNamespace());
}