From 93bc56e14fb0a3b21c7ec1ac024e5e2e0886e4e3 Mon Sep 17 00:00:00 2001 From: uwetews Date: Tue, 12 Jul 2016 02:28:56 +0200 Subject: [PATCH] Update security test --- tests/UnitTests/SecurityTests/SecurityTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index 307f09ab..a3edb867 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -28,6 +28,18 @@ class SecurityTest extends PHPUnit_Smarty $this->cleanDir($this->smarty->getCompileDir()); } + /** + * test that security is loaded + */ + public function testSecurityReenable() + { + $this->smarty->disableSecurity(); + $this->smarty->enableSecurity('Security'); + $this->smarty->fetch('helloworld.tpl'); + $this->smarty->disableSecurity(); + $this->smarty->enableSecurity('Security'); + $this->smarty->fetch('helloworld.tpl'); + } /** * test that security is loaded */ @@ -383,3 +395,7 @@ class mysecuritystaticclass return $i * $i; } } +class Security extends Smarty_Security +{ + +}