mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 17:34:26 +02:00
New unit test for function scope
This commit is contained in:
@@ -299,4 +299,12 @@ class ScopeTest extends PHPUnit_Smarty
|
|||||||
$this->smarty->assign('scope', 'none');
|
$this->smarty->assign('scope', 'none');
|
||||||
$r = $this->smarty->fetch('test_function_scope.tpl');
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user