diff --git a/tests/README.md b/tests/README.md
index 332c7c34..29e669e9 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -4,10 +4,10 @@
For installing the PHPUnit test by composer use the following:
"require-dev": {
- "smarty/smarty-phpunit": "3.1.18"
+ "smarty/smarty-phpunit": "3.1.20"
}
-Replace 3.1.19 with the installed Smarty version number.
+Replace 3.1.20 with the installed Smarty version number.
Starting with Smarty version 3.1.22 the "require-dev" section will be added
to the composer.json file of the Smarty distribution.
diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php
index 4bed0c8a..9e396eec 100644
--- a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php
+++ b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php
@@ -51,6 +51,16 @@ public function testPHP_REMOVEphp()
$this->assertEquals("a echo 'hello world';e", $content, 'remove <% %>');
+ }
+ /**
+ * test tag
+ * PHP_REMOVE
+ */
+ public function testPHP_REMOVEscript()
+ {
+ $this->smarty->setPhpHandling(Smarty::PHP_REMOVE);
+ $content = $this->smarty->fetch("string:ae");
+ $this->assertEquals("a echo 'hello world';e", $content, "remove tag
+ * PHP_PASSTHRU
+ */
+ public function testPHP_PASSTHRUscript()
+ {
+ $this->smarty->setPhpHandling(Smarty::PHP_PASSTHRU);
+ $content = $this->smarty->fetch("string:pape");
+ $this->assertEquals("pape", $content, "passthru tag
+ * PHP_QUOTE
+ */
+ public function testPHP_QUOTEscript()
+ {
+ $this->smarty->setPhpHandling(Smarty::PHP_QUOTE);
+ $content = $this->smarty->fetch("string:qaqe");
+ $this->assertEquals("qa<script language='php'> echo 'hello world';</script>qe", $content, "quote tag
+ * PHP_ALLOW
+ */
+ public function testPHP_ALLOWscript()
+ {
+ $this->smartyBC->setPhpHandling(Smarty::PHP_ALLOW);
+ $content = $this->smartyBC->fetch("string:aa ae");
+ $this->assertEquals('aa hello world ae', $content, "allow