mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Update capture test
This commit is contained in:
@@ -78,6 +78,13 @@ class CompileCaptureTest extends PHPUnit_Smarty
|
||||
$tpl = $this->smarty->createTemplate('eval:{capture assign=foo}hello {capture assign=bar}this is my {/capture}world{/capture}{$foo} {$bar}');
|
||||
$this->assertEquals("hello world this is my ", $this->smarty->fetch($tpl), 'This failure pops up only during PHPunit test ?????');
|
||||
}
|
||||
/*
|
||||
* Test that capture results are global
|
||||
*/
|
||||
public function testCapture9()
|
||||
{
|
||||
$this->assertContains('-->hello world<--', $this->smarty->fetch('009_capture.tpl'));
|
||||
}
|
||||
|
||||
public function testCompileCaptureNocache1()
|
||||
{
|
||||
|
@@ -0,0 +1,2 @@
|
||||
{capture name='test'}hello world{/capture}
|
||||
{include '009_capture_include.tpl'}
|
@@ -0,0 +1 @@
|
||||
-->{$smarty.capture.test}<--
|
Reference in New Issue
Block a user