mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Test template function call in fetched template
This commit is contained in:
@@ -181,7 +181,7 @@ class CompileFunctionTest extends PHPUnit_Smarty
|
||||
}
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
* @run InSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
* @dataProvider functionProviderInline
|
||||
* test function definition in include
|
||||
@@ -213,6 +213,20 @@ class CompileFunctionTest extends PHPUnit_Smarty
|
||||
$this->assertContains('foo foo', $this->smarty->fetch($tpl), $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @run InSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
* test external function definition and called by fetch
|
||||
*
|
||||
*/
|
||||
public function testExternalDefinedFunctionCalledByFetch()
|
||||
{
|
||||
$this->smarty->assign('foo', 'foo');
|
||||
$this->assertContains('foo foo', $this->smarty->fetch('test_template_function.tpl'));
|
||||
$this->smarty->assign('foo', 'bar');
|
||||
$this->assertContains('bar bar', $this->smarty->fetch('test_template_function_call.tpl'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
* @preserveGlobalState disabled
|
||||
|
@@ -0,0 +1 @@
|
||||
{call name=template_func1}
|
Reference in New Issue
Block a user