mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Test simplw plugin nocache
This commit is contained in:
@@ -23,6 +23,25 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty
|
|||||||
$this->cleanDirs();
|
$this->cleanDirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test function plugin nocache tag
|
||||||
|
* @runInSeparateProcess
|
||||||
|
*/
|
||||||
|
public function testFunctionPluginFromTemplateFileNocache1()
|
||||||
|
{
|
||||||
|
$this->smarty->setCaching(true);
|
||||||
|
$this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl'));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* test function plugin tag in template file
|
||||||
|
* @runInSeparateProcess
|
||||||
|
*/
|
||||||
|
public function testFunctionPluginFromTemplateFileNocache2()
|
||||||
|
{
|
||||||
|
$this->smarty->setCaching(true);
|
||||||
|
$this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test function plugin tag in template file
|
* test function plugin tag in template file
|
||||||
*/
|
*/
|
||||||
@@ -31,7 +50,6 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty
|
|||||||
$tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty);
|
$tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty);
|
||||||
$this->assertEquals("10", $this->smarty->fetch($tpl));
|
$this->assertEquals("10", $this->smarty->fetch($tpl));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test function plugin tag in compiled template file
|
* test function plugin tag in compiled template file
|
||||||
*/
|
*/
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
{counter nocache}
|
Reference in New Issue
Block a user