Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit c9ef3cb

Browse files
committed
Test simplw plugin nocache
1 parent b692b6f commit c9ef3cb

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ public function testInit()
2323
$this->cleanDirs();
2424
}
2525

26+
/**
27+
* test function plugin nocache tag
28+
* @runInSeparateProcess
29+
*/
30+
public function testFunctionPluginFromTemplateFileNocache1()
31+
{
32+
$this->smarty->setCaching(true);
33+
$this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl'));
34+
}
35+
/**
36+
* test function plugin tag in template file
37+
* @runInSeparateProcess
38+
*/
39+
public function testFunctionPluginFromTemplateFileNocache2()
40+
{
41+
$this->smarty->setCaching(true);
42+
$this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl'));
43+
}
44+
2645
/**
2746
* test function plugin tag in template file
2847
*/
@@ -31,7 +50,6 @@ public function testFunctionPluginFromTemplateFile()
3150
$tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty);
3251
$this->assertEquals("10", $this->smarty->fetch($tpl));
3352
}
34-
3553
/**
3654
* test function plugin tag in compiled template file
3755
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{counter nocache}

0 commit comments

Comments
 (0)