From afd68d7104976e98c980d7cca676fd101bc4e0f2 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Mon, 20 Nov 2017 02:17:35 +0100 Subject: [PATCH] Update --- .../TagTests/Delimiter/CompileDelimiterTest.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php index 0a9b88ce..16ae980f 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php @@ -9,7 +9,7 @@ /** * class for delimiter tags tests * - * @runTestsInSeparateProcess + * @run TestsInSeparateProcess * @preserveGlobalState disabled * @backupStaticAttributes enabled */ @@ -25,10 +25,11 @@ class CompileDelimiterTest extends PHPUnit_Smarty { $this->cleanDirs(); } + /** * test delimiter tag test */ - public function testLeftDelimiter() + public function testLeftDelimiter() { $tpl = $this->smarty->createTemplate('string:x{ldelim}x'); $this->assertEquals('x{x', $this->smarty->fetch($tpl)); @@ -39,4 +40,16 @@ class CompileDelimiterTest extends PHPUnit_Smarty $tpl = $this->smarty->createTemplate('string:x{rdelim}x'); $this->assertEquals('x}x', $this->smarty->fetch($tpl)); } + + /** + * @expectedException SmartyCompilerException + * @expectedExceptionMessage nocache option not allowed + */ + public function testLeftDelimiterError() + { + $tpl = $this->smarty->createTemplate('string:x{ldelim nocache}x'); + $this->assertEquals('x{x', $this->smarty->fetch($tpl)); + } + + }