You are here

public function Twig_Tests_Loader_ChainTest::testGetCacheKey in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php \Twig_Tests_Loader_ChainTest::testGetCacheKey()

File

vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php, line 35

Class

Twig_Tests_Loader_ChainTest

Code

public function testGetCacheKey() {
  $loader = new Twig_Loader_Chain(array(
    new Twig_Loader_Array(array(
      'foo' => 'bar',
    )),
    new Twig_Loader_Array(array(
      'foo' => 'foobar',
      'bar' => 'foo',
    )),
  ));
  $this
    ->assertEquals('bar', $loader
    ->getCacheKey('foo'));
  $this
    ->assertEquals('foo', $loader
    ->getCacheKey('bar'));
}