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()
202
202
public function testInsertPluginCaching3_1 ()
203
203
{
204
204
$ 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 ' ));
206
207
}
207
208
208
209
/**
@@ -214,7 +215,8 @@ public function testInsertPluginCaching3_2()
214
215
{
215
216
sleep (2 );
216
217
$ 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 ' ));
218
220
}
219
221
220
222
Original file line number Diff line number Diff line change 1
1
<?php
2
2
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 ;
5
6
}
Original file line number Diff line number Diff line change 1
- { insert name= ' test2' }
1
+ { insert name= ' test2' var= ' insert ' }
2
2
{ include ' inner.tpl' }
You can’t perform that action at this time.
0 commit comments