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 +{ + +}