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:
@@ -213,6 +213,20 @@ class CompileFunctionTest extends PHPUnit_Smarty
|
|||||||
$this->assertContains('foo foo', $this->smarty->fetch($tpl), $text);
|
$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
|
* @runInSeparateProcess
|
||||||
* @preserveGlobalState disabled
|
* @preserveGlobalState disabled
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
{call name=template_func1}
|
Reference in New Issue
Block a user