This repository was archived by the owner on Apr 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
UnitTests/TemplateSource/TagTests/Insert Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ public function testInsertPluginCaching2_2()
202202 public function testInsertPluginCaching3_1 ()
203203 {
204204 $ this ->smarty ->caching = true ;
205- $ this ->assertContains (time ().'Inner template ' , $ this ->smarty ->fetch ('insertplugintest2.tpl ' ));
205+ $ this ->smarty ->assign ('insert ' ,$ t =time ());
206+ $ this ->assertContains ($ t .'Inner template ' , $ this ->smarty ->fetch ('insertplugintest2.tpl ' ));
206207 }
207208
208209 /**
@@ -214,7 +215,8 @@ public function testInsertPluginCaching3_2()
214215 {
215216 sleep (2 );
216217 $ this ->smarty ->caching = true ;
217- $ this ->assertContains (time ().'Inner template ' , $ this ->smarty ->fetch ('insertplugintest2.tpl ' ));
218+ $ this ->smarty ->assign ('insert ' ,$ t =time ());
219+ $ this ->assertContains ($ t .'Inner template ' , $ this ->smarty ->fetch ('insertplugintest2.tpl ' ));
218220 }
219221
220222
Original file line number Diff line number Diff line change 11<?php
22
3- function smarty_insert_test2 ($ params , &$ smarty ) {
4- return time ();
3+ function smarty_insert_test2 ($ params , $ smarty ) {
4+
5+ return $ smarty ->tpl_vars [$ params ['var ' ]]->value ;
56}
Original file line number Diff line number Diff line change 1- { insert name= ' test2' }
1+ { insert name= ' test2' var= ' insert ' }
22{ include ' inner.tpl' }
You can’t perform that action at this time.
0 commit comments