From bfb502b6332aee644f2e6d737cebb6d710723d94 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 19 Oct 2016 20:40:41 +0200 Subject: [PATCH] {make_nocache} add space test --- .../TagTests/MakeNocache/CompileMakeNocacheTest.php | 11 +++++++++++ .../MakeNocache/templates/003_test_spaces.tpl | 1 + 2 files changed, 12 insertions(+) create mode 100644 tests/UnitTests/TemplateSource/TagTests/MakeNocache/templates/003_test_spaces.tpl diff --git a/tests/UnitTests/TemplateSource/TagTests/MakeNocache/CompileMakeNocacheTest.php b/tests/UnitTests/TemplateSource/TagTests/MakeNocache/CompileMakeNocacheTest.php index 0bd27101..32b3f845 100644 --- a/tests/UnitTests/TemplateSource/TagTests/MakeNocache/CompileMakeNocacheTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/MakeNocache/CompileMakeNocacheTest.php @@ -294,5 +294,16 @@ class CompileMakeNocacheTest extends PHPUnit_Smarty $this->assertEquals($this->strip('uwe\'s'), $this->strip($this->smarty->fetch('002_test_backslash.tpl'))); } + /** + * Test {make_nocache} with values containing spaces + * + * @preserveGlobalState disabled + */ + public function testMakeNocache_003() + { + $this->smarty->setCaching(true); + $this->smarty->assign('foo', 'the Smarty template engine'); + $this->assertEquals($this->strip('the Smarty template engine'), $this->strip($this->smarty->fetch('003_test_spaces.tpl'))); + } } diff --git a/tests/UnitTests/TemplateSource/TagTests/MakeNocache/templates/003_test_spaces.tpl b/tests/UnitTests/TemplateSource/TagTests/MakeNocache/templates/003_test_spaces.tpl new file mode 100644 index 00000000..ab21fba8 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/MakeNocache/templates/003_test_spaces.tpl @@ -0,0 +1 @@ +{make_nocache $foo}{$foo nocache} \ No newline at end of file