summaryrefslogtreecommitdiff
path: root/tests/UnitTests/TemplateSource/X_Scopes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/UnitTests/TemplateSource/X_Scopes')
-rw-r--r--tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php
index 4f805fae..3999538e 100644
--- a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php
+++ b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php
@@ -325,4 +325,13 @@ class ScopeTest extends PHPUnit_Smarty
$this->smarty->assign('scope', 'none');
$r = $this->smarty->fetch('test_function_scope.tpl');
}
+
+ public function testFunctionScopeIsLocalByDefault()
+ {
+ $this->assertEquals(
+ 'a',
+ $this->smarty->fetch('string:{function name=test}{$var="b"}{/function}{$var="a"}{test}{$var}')
+ );
+ }
+
}