diff --git a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php index 8c0a7156e..8febf2e0c 100644 --- a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php @@ -299,4 +299,12 @@ public function testFunctionScope() $this->smarty->assign('scope', 'none'); $r = $this->smarty->fetch('test_function_scope.tpl'); } + + public function testFunctionScopeIsLocalByDefault() + { + $r = $this->smarty->fetch('string:{function name=test}{$var="b"}{/function}{$var="a"}{test}{$var}'); + $this->assertEquals('a', $r); + } + + }