mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
Update security test
This commit is contained in:
@@ -28,6 +28,18 @@ class SecurityTest extends PHPUnit_Smarty
|
|||||||
$this->cleanDir($this->smarty->getCompileDir());
|
$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
|
* test that security is loaded
|
||||||
*/
|
*/
|
||||||
@@ -383,3 +395,7 @@ class mysecuritystaticclass
|
|||||||
return $i * $i;
|
return $i * $i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class Security extends Smarty_Security
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user