From 5c0072430c38879f9e746b0b5040a8a986c26f23 Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Mon, 22 Mar 2021 10:35:05 +0100 Subject: [PATCH] Add unit test --- .../TagTests/Include/CompileIncludeTest.php | 8 ++++++++ .../TagTests/Include/templates/inline_string_include.tpl | 1 + 2 files changed, 9 insertions(+) create mode 100644 tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php index 830089ae..c07f1100 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php @@ -324,4 +324,12 @@ class CompileIncludeTest extends PHPUnit_Smarty array("A{include file='include_spacing3.tpl'}B\nC", "AbarB\nC", '3_Newline3', $i++), ); } + + /** + * Test Inline Include with string template + */ + public function testInlineStringInclude() + { + $this->assertEquals('include-inline', $this->smarty->fetch('inline_string_include.tpl')); + } } diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl b/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl new file mode 100644 index 00000000..44d7eb3a --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl @@ -0,0 +1 @@ +{include "string:include-inline" inline} \ No newline at end of file