@@ -39,7 +39,7 @@ public function testInit()
3939 public function testConfigNumber ()
4040 {
4141 $ this ->smarty ->configLoad ('test.conf ' );
42- $ this ->assertEquals ("123.4 " , $ this ->smarty ->fetch ('eval:{#Number#} ' ));
42+ $ this ->assertEquals ("123.4 " , $ this ->smarty ->fetch ('number.tpl ' ));
4343 }
4444
4545 /**
@@ -51,7 +51,7 @@ public function testConfigNumber()
5151 public function testConfigText ()
5252 {
5353 $ this ->smarty ->configLoad ('test.conf ' );
54- $ this ->assertEquals ("123bvc " , $ this ->smarty ->fetch ('eval:{# text#} ' ));
54+ $ this ->assertEquals ("123bvc " , $ this ->smarty ->fetch ('text.tpl ' ));
5555 }
5656
5757 /**
@@ -75,7 +75,7 @@ public function testConfigLine()
7575 public function testConfigVariableGlobalSections ()
7676 {
7777 $ this ->smarty ->configLoad ('test.conf ' );
78- $ this ->assertEquals ("Welcome to Smarty! Global Section1 Global Section2 " , $ this ->smarty ->fetch ('eval:{#title#} {#sec1#} {#sec2#} ' ));
78+ $ this ->assertEquals ("Welcome to Smarty! Global Section1 Global Section2 " , $ this ->smarty ->fetch ('sec1sec2.tpl ' ));
7979 }
8080
8181 /**
@@ -87,7 +87,7 @@ public function testConfigVariableGlobalSections()
8787 public function testConfigVariableSection2 ()
8888 {
8989 $ this ->smarty ->configLoad ('test.conf ' , 'section2 ' );
90- $ this ->assertEquals ("Welcome to Smarty! Global Section1 Hello Section2 " , $ this ->smarty ->fetch ('eval:{#title#} {#sec1#} {#sec2#} ' ));
90+ $ this ->assertEquals ("Welcome to Smarty! Global Section1 Hello Section2 " , $ this ->smarty ->fetch ('sec1sec2.tpl ' ));
9191 }
9292
9393 /**
@@ -99,7 +99,7 @@ public function testConfigVariableSection2()
9999 public function testConfigVariableSectionSpecialChar ()
100100 {
101101 $ this ->smarty ->configLoad ('test.conf ' , '/ ' );
102- $ this ->assertEquals ("Welcome to Smarty! special char " , $ this ->smarty ->fetch ('eval:{#title#} {# sec#} ' ));
102+ $ this ->assertEquals ("Welcome to Smarty! special char " , $ this ->smarty ->fetch ('sec.tpl ' ));
103103 }
104104
105105 /**
@@ -111,7 +111,7 @@ public function testConfigVariableSectionSpecialChar()
111111 public function testConfigVariableSectionFooBar ()
112112 {
113113 $ this ->smarty ->configLoad ('test.conf ' , 'foo/bar ' );
114- $ this ->assertEquals ("Welcome to Smarty! section foo/bar " , $ this ->smarty ->fetch ('eval:{#title#} {# sec#} ' ));
114+ $ this ->assertEquals ("Welcome to Smarty! section foo/bar " , $ this ->smarty ->fetch ('sec.tpl ' ));
115115 }
116116
117117 /**
@@ -123,9 +123,9 @@ public function testConfigVariableSectionFooBar()
123123 public function testConfigDifferentScope ()
124124 {
125125 $ this ->smarty ->configLoad ('test.conf ' , 'section2 ' );
126- $ tpl = $ this ->smarty ->createTemplate ('eval:{#title#} {#sec1#} {#sec2#} ' );
126+ $ tpl = $ this ->smarty ->createTemplate ('sec1sec2.tpl ' );
127127 $ tpl ->configLoad ('test.conf ' , 'section1 ' );
128- $ this ->assertEquals ("Welcome to Smarty! Global Section1 Hello Section2 " , $ this ->smarty ->fetch ('eval:{#title#} {#sec1#} {#sec2#} ' ));
128+ $ this ->assertEquals ("Welcome to Smarty! Global Section1 Hello Section2 " , $ this ->smarty ->fetch ('sec1sec2.tpl ' ));
129129 $ this ->assertEquals ("Welcome to Smarty! Hello Section1 Global Section2 " , $ this ->smarty ->fetch ($ tpl ));
130130 }
131131
@@ -140,7 +140,7 @@ public function testConfigVariableHidden()
140140 {
141141 $ this ->smarty ->config_read_hidden = true ;
142142 $ this ->smarty ->configLoad ('test.conf ' , 'hidden ' );
143- $ this ->assertEquals ("Welcome to Smarty!Hidden Section " , $ this ->smarty ->fetch ('eval:{#title#}{#hiddentext#} ' ));
143+ $ this ->assertEquals ("Welcome to Smarty!Hidden Section " , $ this ->smarty ->fetch ('hidden.tpl ' ));
144144 }
145145
146146 /**
@@ -155,7 +155,7 @@ public function testConfigVariableHiddenDisable()
155155 $ this ->smarty ->setErrorReporting (error_reporting () & ~(E_NOTICE | E_USER_NOTICE ));
156156 $ this ->smarty ->config_read_hidden = false ;
157157 $ this ->smarty ->configLoad ('test.conf ' , 'hidden ' );
158- $ this ->assertEquals ("Welcome to Smarty! " , $ this ->smarty ->fetch ('eval:{#title#}{#hiddentext#} ' ));
158+ $ this ->assertEquals ("Welcome to Smarty! " , $ this ->smarty ->fetch ('hidden.tpl ' ));
159159 }
160160
161161 /**
@@ -223,7 +223,7 @@ public function testConfigTextData()
223223 {
224224 $ data = $ this ->smarty ->createData ();
225225 $ data ->configLoad ('test.conf ' );
226- $ this ->assertEquals ("123bvc " , $ this ->smarty ->fetch ('eval:{# text#} ' , $ data ));
226+ $ this ->assertEquals ("123bvc " , $ this ->smarty ->fetch ('text.tpl ' , $ data ));
227227 }
228228
229229 /**
@@ -294,7 +294,7 @@ public function testConfigClearConfigAllData()
294294 */
295295 public function testConfigTextTemplate ()
296296 {
297- $ tpl = $ this ->smarty ->createTemplate ('eval:{# text#} ' );
297+ $ tpl = $ this ->smarty ->createTemplate ('text.tpl ' );
298298 $ tpl ->configLoad ('test.conf ' );
299299 $ this ->assertEquals ("123bvc " , $ this ->smarty ->fetch ($ tpl ));
300300 }
@@ -307,7 +307,7 @@ public function testConfigTextTemplate()
307307 */
308308 public function testConfigGetSingleConfigVarTemplate ()
309309 {
310- $ tpl = $ this ->smarty ->createTemplate ('eval:{# text#} ' );
310+ $ tpl = $ this ->smarty ->createTemplate ('text.tpl ' );
311311 $ tpl ->configLoad ('test.conf ' );
312312 $ this ->assertEquals ("Welcome to Smarty! " , $ tpl ->getConfigVars ('title ' ));
313313 }
@@ -320,7 +320,7 @@ public function testConfigGetSingleConfigVarTemplate()
320320 */
321321 public function testConfigGetAllConfigVarsTemplate ()
322322 {
323- $ tpl = $ this ->smarty ->createTemplate ('eval:{# text#} ' );
323+ $ tpl = $ this ->smarty ->createTemplate ('text.tpl ' );
324324 $ tpl ->configLoad ('test.conf ' );
325325 $ vars = $ tpl ->getConfigVars ();
326326 $ this ->assertTrue (is_array ($ vars ));
@@ -336,7 +336,7 @@ public function testConfigGetAllConfigVarsTemplate()
336336 */
337337 public function testConfigClearSingleConfigVarTemplate ()
338338 {
339- $ tpl = $ this ->smarty ->createTemplate ('eval:{# text#} ' );
339+ $ tpl = $ this ->smarty ->createTemplate ('text.tpl ' );
340340 $ tpl ->configLoad ('test.conf ' );
341341 $ tpl ->clearConfig ('title ' );
342342 $ this ->assertEquals ("" , $ tpl ->getConfigVars ('title ' ));
@@ -351,7 +351,7 @@ public function testConfigClearSingleConfigVarTemplate()
351351 */
352352 public function testConfigClearConfigAllTemplate ()
353353 {
354- $ tpl = $ this ->smarty ->createTemplate ('eval:{# text#} ' );
354+ $ tpl = $ this ->smarty ->createTemplate ('text.tpl ' );
355355 $ tpl ->configLoad ('test.conf ' );
356356 $ tpl ->clearConfig ();
357357 $ vars = $ tpl ->getConfigVars ();
@@ -369,25 +369,25 @@ public function testConfigAbsolutePath()
369369 {
370370 $ file = realpath ($ this ->smarty ->getConfigDir (0 ) . 'test.conf ' );
371371 $ this ->smarty ->configLoad ($ file );
372- $ this ->assertEquals ("123.4 " , $ this ->smarty ->fetch ('eval:{#Number#} ' ));
372+ $ this ->assertEquals ("123.4 " , $ this ->smarty ->fetch ('number.tpl ' ));
373373 }
374374
375375 public function testConfigResourceDb4 ()
376376 {
377377 $ this ->smarty ->addPluginsDir (dirname (__FILE__ ) . "/PHPunitplugins/ " );
378378 $ this ->smarty ->configLoad ('db4:foo.conf ' );
379- $ this ->assertEquals ("bar " , $ this ->smarty ->fetch ('eval:{# foo#} ' ));
379+ $ this ->assertEquals ("bar " , $ this ->smarty ->fetch ('foo.tpl ' ));
380380 }
381381 public function testConfigUndefinedSilent ()
382382 {
383- $ this ->assertEquals ("" , $ this ->smarty ->fetch ('eval:{# foo#} ' ));
383+ $ this ->assertEquals ("" , $ this ->smarty ->fetch ('foo.tpl ' ));
384384 }
385385
386386 public function testConfigUndefinedNotice ()
387387 {
388388 $ this ->smarty ->error_unassigned = true ;
389389 try {
390- $ this ->assertEquals ("" , $ this ->smarty ->fetch ('eval:{# foo#} ' ));
390+ $ this ->assertEquals ("" , $ this ->smarty ->fetch ('foo.tpl ' ));
391391 }
392392 catch (Exception $ e ) {
393393 $ this ->assertEquals ('Undefined variable: foo ' , $ e ->getMessage ());
0 commit comments