summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Wisselink <wisskid@users.noreply.github.com>2024-01-01 22:41:09 +0100
committerGitHub <noreply@github.com>2024-01-01 22:41:09 +0100
commit08c90664f0a3c01e4f938198e3af58949f64107c (patch)
tree5b6290eb2d6eb6337e247d9c20758c247685698d /tests
parentf2a66365dec903fc329f73e6da69419f1789f633 (diff)
downloadsmarty-08c90664f0a3c01e4f938198e3af58949f64107c.tar.gz
smarty-08c90664f0a3c01e4f938198e3af58949f64107c.tar.bz2
smarty-08c90664f0a3c01e4f938198e3af58949f64107c.zip
Fixed failing {debug} tag. (#923)
Fixes #922
Diffstat (limited to 'tests')
-rw-r--r--tests/UnitTests/TemplateSource/TagTests/Debug/DebugTest.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/UnitTests/TemplateSource/TagTests/Debug/DebugTest.php b/tests/UnitTests/TemplateSource/TagTests/Debug/DebugTest.php
new file mode 100644
index 00000000..96064912
--- /dev/null
+++ b/tests/UnitTests/TemplateSource/TagTests/Debug/DebugTest.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace UnitTests\TemplateSource\TagTests\Debug;
+use PHPUnit_Smarty;
+use Smarty\Smarty;
+
+/**
+ * Smarty PHPunit tests of {debug} tag
+ */
+class PluginModifierStripTagsTest extends PHPUnit_Smarty {
+
+ public function setUp(): void {
+ $this->setUpSmarty(__DIR__);
+ }
+ public function testDefault() {
+ $tpl = $this->smarty->createTemplate('eval:{debug}');
+ $output = $this->smarty->fetch($tpl);
+ $this->assertStringContainsString("<script", $output);
+ $this->assertStringContainsString("</script>", $output);
+ }
+
+}