Commit a91a53f9 by seldaek

adding a test to check for disallowed php functions

git-svn-id: http://svn.dwoo.org/trunk@338 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent 9dbd272c
......@@ -69,6 +69,17 @@ class SecurityTests extends PHPUnit_Framework_TestCase
$this->assertEquals("fooOK", $this->dwoo->get($tpl, array(), $this->compiler));
}
/**
* @expectedException Dwoo_Exception
*/
public function testNotAllowedPhpFunction()
{
$tpl = new Dwoo_Template_String('{strtotime("2000-01-01")}');
$tpl->forceCompilation();
$this->dwoo->get($tpl, array(), $this->compiler);
}
public function testAllowDirectoryGetSet()
{
$old = $this->policy->getAllowedDirectories();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment