21 $this->assertEquals(
'bar',
$loader->getSource(
'foo'));
42 $loader->getSourceContext(
'foo');
49 $this->assertEquals(
'foo:bar',
$loader->getCacheKey(
'foo'));
59 $this->assertEquals(
'foo:bar',
$loader->getCacheKey(
'foo'));
60 $this->assertEquals(
'baz:bar',
$loader->getCacheKey(
'baz'));
70 $this->assertEquals(
'foo__:bar',
$loader->getCacheKey(
'foo__'));
71 $this->assertEquals(
'foo:__bar',
$loader->getCacheKey(
'foo'));
87 $loader->setTemplate(
'foo',
'bar');
89 $this->assertEquals(
'bar',
$loader->getSourceContext(
'foo')->getCode());
95 $this->assertTrue(
$loader->isFresh(
'foo', time()));
105 $loader->isFresh(
'foo', time());
120 $this->addToAssertionCount(1);
An exception for terminatinating execution or to throw for unit testing.
Loads a template from an array.
testGetSource()
@group legacy
testGetCacheKeyWhenTemplateHasDuplicateContent()
testIsFreshWhenTemplateDoesNotExist()
@expectedException Twig_Error_Loader
testGetCacheKeyWhenTemplateDoesNotExist()
@expectedException Twig_Error_Loader
testGetSourceWhenTemplateDoesNotExist()
@group legacy @expectedException Twig_Error_Loader
testGetSourceContextWhenTemplateDoesNotExist()
@expectedException Twig_Error_Loader
testGetCacheKeyIsProtectedFromEdgeCollisions()