mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
update scope with test for {assign.. noscope}
This commit is contained in:
@@ -46,7 +46,8 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
$data = $this->smarty->createData($data1);
|
||||
$data1->assign('foo', 'data1');
|
||||
$data->assign('foo', 'data');
|
||||
$this->assertEquals($this->strip($result), $this->strip($this->smarty->fetch('scope_tag.tpl', $data)), "test - {$code} - {$testName}");
|
||||
$this->assertEquals($this->strip($result), $this->strip($this->smarty->fetch('scope_tag.tpl', $data)),
|
||||
"test - {$code} - {$testName}");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -61,26 +62,18 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
* result
|
||||
* test name
|
||||
*/
|
||||
return array(
|
||||
array(
|
||||
'{$foo[] = \'newvar\' scope=tpl_root}', true,
|
||||
return array(array('{$foo[] = \'newvar\' scope=tpl_root}', true,
|
||||
'#testAppendScope_0.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_include.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_tag.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#data:$foo=\'data\'#data:$foo=\'data1\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{append var=foo value=\'newvar\' scope=tpl_root}', true,
|
||||
'', $i ++,), array('{append var=foo value=\'newvar\' scope=tpl_root}', true,
|
||||
'#testAppendScope_1.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_include.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_tag.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#data:$foo=\'data\'#data:$foo=\'data1\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{append var=foo value=\'newvar\' scope=global}', true,
|
||||
'', $i ++,), array('{append var=foo value=\'newvar\' scope=global}', true,
|
||||
'#testAppendScope_2.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_include.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_tag.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#data:$foo=\'data\'#data:$foo=\'data1\'#Smarty:$foo=\'smarty\'#global:$foo=array(0=>\'data\',1=>\'newvar\',)',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{append var=foo value=\'newvar\' scope=smarty}', true,
|
||||
'', $i ++,),
|
||||
array('{append var=foo value=\'newvar\' scope=smarty}', true,
|
||||
'#testAppendScope_3.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_include.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#scope_tag.tpl:$foo=array(0=>\'data\',1=>\'newvar\',)#data:$foo=\'data\'#data:$foo=\'data1\'#Smarty:$foo=array(0=>\'data\',1=>\'newvar\',)#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
),
|
||||
);
|
||||
'', $i ++,),);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test scope
|
||||
*
|
||||
@@ -97,7 +90,8 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
$this->smarty->assignGlobal('foo', 'global');
|
||||
$data = $this->smarty->createData($useSmarty ? $this->smarty : null);
|
||||
$data->assign('foo', 'data');
|
||||
$this->assertEquals($this->strip('#' . $file . $result), $this->strip($this->smarty->fetch('scope_tag.tpl', $data)), "test - {$code} - {$testName}");
|
||||
$this->assertEquals($this->strip('#' . $file . $result),
|
||||
$this->strip($this->smarty->fetch('scope_tag.tpl', $data)), "test - {$code} - {$testName}");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -105,60 +99,39 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function dataTestAssignScope()
|
||||
{
|
||||
$i = 1;
|
||||
$i = 0;
|
||||
/*
|
||||
* Code
|
||||
* use Smarty object
|
||||
* result
|
||||
* test name
|
||||
*/
|
||||
return array(
|
||||
array(
|
||||
'{$foo = \'newvar\'}', true,
|
||||
return array(array('{$foo = \'newvar\'}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{assign var=foo value=\'newvar\'}', true,
|
||||
'', $i ++,), array('{assign var=foo value=\'newvar\'}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=local}', true,
|
||||
'', $i ++,), array('{$foo = \'newvar\' scope=local}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{assign var=foo value=\'newvar\' scope=local}', true,
|
||||
'', $i ++,),
|
||||
array('{assign var=foo value=\'newvar\' scope=local}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=parent}', true,
|
||||
'', $i ++,), array('{$foo = \'newvar\' scope=parent}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{assign var=foo value=\'newvar\' scope=parent}', true,
|
||||
'', $i ++,), array('{assign var=foo value=\'newvar\' scope=parent}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=tpl_root}', true,
|
||||
'', $i ++,),
|
||||
array('{$foo = \'newvar\' scope=tpl_root}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=global}', true,
|
||||
'', $i ++,), array('{$foo = \'newvar\' scope=global}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'newvar\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=root}', true,
|
||||
'', $i ++,), array('{$foo = \'newvar\' scope=root}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=root}', false,
|
||||
'', $i ++,),
|
||||
array('{$foo = \'newvar\' scope=root}', false,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'no smarty', $i ++,
|
||||
), array(
|
||||
'{$foo = \'newvar\' scope=smarty}', false,
|
||||
'no smarty', $i ++,), array('{$foo = \'newvar\' scope=smarty}', false,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'newvar\'#global:$foo=\'global\'',
|
||||
'no smarty', $i ++,
|
||||
),
|
||||
);
|
||||
'no smarty', $i ++,),);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,22 +160,16 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
* variable value
|
||||
* result
|
||||
*/
|
||||
return array(
|
||||
array(
|
||||
'b1', 'test_scope_assignbar.tpl',
|
||||
'#test_scope_assignbar.tpl:$foo=\'b1\'#Smarty:$foo=\'smarty\'#global:$foo=\'b1\'',
|
||||
), array(
|
||||
'b2', 'test_scope_assignbar.tpl',
|
||||
'#test_scope_assignbar.tpl:$foo=\'b2\'#Smarty:$foo=\'smarty\'#global:$foo=\'b2\'',
|
||||
), array(
|
||||
'b1', 'test_scope_assignnocache.tpl',
|
||||
'#test_scope_assignnocache.tpl:$foo=\'b1\'#Smarty:$foo=\'smarty\'#global:$foo=\'b1\'',
|
||||
), array(
|
||||
'b2', 'test_scope_assignnocache.tpl',
|
||||
'#test_scope_assignnocache.tpl:$foo=\'b2\'#Smarty:$foo=\'smarty\'#global:$foo=\'b2\'',
|
||||
),
|
||||
);
|
||||
return array(array('b1', 'test_scope_assignbar.tpl',
|
||||
'#test_scope_assignbar.tpl:$foo=\'b1\'#Smarty:$foo=\'smarty\'#global:$foo=\'b1\'',),
|
||||
array('b2', 'test_scope_assignbar.tpl',
|
||||
'#test_scope_assignbar.tpl:$foo=\'b2\'#Smarty:$foo=\'smarty\'#global:$foo=\'b2\'',),
|
||||
array('b1', 'test_scope_assignnocache.tpl',
|
||||
'#test_scope_assignnocache.tpl:$foo=\'b1\'#Smarty:$foo=\'smarty\'#global:$foo=\'b1\'',),
|
||||
array('b2', 'test_scope_assignnocache.tpl',
|
||||
'#test_scope_assignnocache.tpl:$foo=\'b2\'#Smarty:$foo=\'smarty\'#global:$foo=\'b2\'',),);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test scope
|
||||
*
|
||||
@@ -212,11 +179,9 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function testIncludeScope($code, $useSmarty, $result, $testName, $testNumber = null)
|
||||
{
|
||||
if ($testNumber) {
|
||||
$file = "testIncludeScope_{$testNumber}.tpl";
|
||||
$this->makeTemplateFile($file, $code);
|
||||
$this->smarty->assignGlobal('file', $file);
|
||||
}
|
||||
$this->smarty->assign('foo', 'smarty');
|
||||
$this->smarty->assignGlobal('foo', 'global');
|
||||
$data = $this->smarty->createData($useSmarty ? $this->smarty : null);
|
||||
@@ -233,23 +198,47 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function dataTestIncludeScope()
|
||||
{
|
||||
$i = 1;
|
||||
$i = 0;
|
||||
return array(/*
|
||||
* Code
|
||||
* use Smarty object
|
||||
* result
|
||||
* test name
|
||||
*/
|
||||
array('{include \'test_scope_assign.tpl\'}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'data\'#test_scope.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=parent}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=tpl_root}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=root}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=root}', false, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=smarty}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'newvar\'#global:$foo=\'global\'', '', $i++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=global}', true, '#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'newvar\'', '', $i++),
|
||||
array('{include \'test_scope_pluginassign.tpl\' scope=global}', true, '#test_scope_pluginassign.tpl:$foo=\'newvar\'#testIncludeScope_'.$i.'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'newvar\'', '', $i++),
|
||||
);
|
||||
array('{include \'test_scope_assign.tpl\'}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'data\'#test_scope.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++), array('{include \'test_scope_assign.tpl\' scope=parent}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=tpl_root}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++), array('{include \'test_scope_assign.tpl\' scope=root}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++), array('{include \'test_scope_assign.tpl\' scope=root}', false,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' .
|
||||
$i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++),
|
||||
array('{include \'test_scope_assign.tpl\' scope=smarty}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'newvar\'#global:$foo=\'global\'',
|
||||
'', $i ++), array('{include \'test_scope_assign.tpl\' scope=global}', true,
|
||||
'#test_scope_assign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'newvar\'',
|
||||
'', $i ++),
|
||||
array('{include \'test_scope_pluginassign.tpl\' scope=global}', true,
|
||||
'#test_scope_pluginassign.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'newvar\'#test_scope.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'newvar\'',
|
||||
'', $i ++), array('{include \'test_scope_assign_noscope.tpl\' scope=root}', true,
|
||||
'#test_scope_assign_noscope.tpl:$foo=\'newvar\'#testIncludeScope_' . $i .
|
||||
'.tpl:$foo=\'data\'#test_scope.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'#global:$foo=\'global\'',
|
||||
'', $i ++),);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test scope
|
||||
*
|
||||
@@ -265,7 +254,8 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
$this->smarty->configLoad('smarty.conf');
|
||||
$data = $this->smarty->createData($useSmarty ? $this->smarty : null);
|
||||
$data->configLoad('data.conf');
|
||||
$this->assertEquals($this->strip('#' . $file . $result), $this->strip($this->smarty->fetch('scope_tag.tpl', $data)), "test - {$code} - {$testName}");
|
||||
$this->assertEquals($this->strip('#' . $file . $result),
|
||||
$this->strip($this->smarty->fetch('scope_tag.tpl', $data)), "test - {$code} - {$testName}");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -273,49 +263,35 @@ class ScopeTest extends PHPUnit_Smarty
|
||||
*/
|
||||
public function dataTestConfigScope()
|
||||
{
|
||||
$i = 1;
|
||||
$i = 0;
|
||||
/*
|
||||
* Code
|
||||
* use Smarty object
|
||||
* result
|
||||
* test name
|
||||
*/
|
||||
return array(
|
||||
array(
|
||||
'{config_load \'template.conf\'}', true,
|
||||
return array(array('{config_load \'template.conf\'}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=local}', true,
|
||||
'', $i ++,), array('{config_load \'template.conf\' scope=local}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'data\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=parent}', true,
|
||||
'', $i ++,), array('{config_load \'template.conf\' scope=parent}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'data\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=tpl_root}', true,
|
||||
'', $i ++,),
|
||||
array('{config_load \'template.conf\' scope=tpl_root}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'smarty\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=root}', true,
|
||||
'', $i ++,), array('{config_load \'template.conf\' scope=root}', true,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'',
|
||||
'', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=root}', false,
|
||||
'', $i ++,), array('{config_load \'template.conf\' scope=root}', false,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'newvar\'#Smarty:$foo=\'smarty\'',
|
||||
'no smarty', $i ++,
|
||||
), array(
|
||||
'{config_load \'template.conf\' scope=smarty}', false,
|
||||
'no smarty', $i ++,),
|
||||
array('{config_load \'template.conf\' scope=smarty}', false,
|
||||
':$foo=\'newvar\'#scope_include.tpl:$foo=\'newvar\'#scope_tag.tpl:$foo=\'newvar\'#data:$foo=\'data\'#Smarty:$foo=\'newvar\'',
|
||||
'no smarty', $i ++,
|
||||
),
|
||||
);
|
||||
'no smarty', $i ++,),);
|
||||
}
|
||||
|
||||
public function testFunctionScope() {
|
||||
public function testFunctionScope()
|
||||
{
|
||||
$this->smarty->assign('scope', 'none');
|
||||
$r = $this->smarty->fetch('test_function_scope.tpl');
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
{$foo = 'newvar' noscope}{checkvar var=foo}
|
Reference in New Issue
Block a user