mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 14:36:57 +00:00
Upgrade problem
This commit is contained in:
committed by
Fabien Potencier
parent
25f7b0c7eb
commit
9f5fa532ef
@@ -107,6 +107,16 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
||||
} catch (LogicException $e) {
|
||||
$this->assertFalse(array_key_exists('bar', $twig->getGlobals()));
|
||||
}
|
||||
|
||||
// test adding globals after initRuntime without call to getGlobals
|
||||
$twig = new Twig_Environment(new Twig_Loader_String());
|
||||
$twig->initRuntime();
|
||||
try {
|
||||
$twig->addGlobal('bar', 'bar');
|
||||
$this->fail();
|
||||
} catch (LogicException $e) {
|
||||
$this->assertFalse(array_key_exists('bar', $twig->getGlobals()));
|
||||
}
|
||||
}
|
||||
|
||||
public function testExtensionsAreNotInitializedWhenRenderingACompiledTemplate()
|
||||
|
||||
Reference in New Issue
Block a user