mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
Fix phpunit warning
This commit is contained in:
committed by
Thomas A. Hirsch
parent
277648b81c
commit
323aefa89f
@@ -366,9 +366,9 @@ class SecurityTest extends PHPUnit_Smarty
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* In security mode, accessing $smarty.template_object should be illegal.
|
* In security mode, accessing $smarty.template_object should be illegal.
|
||||||
* @expectedException SmartyCompilerException
|
|
||||||
*/
|
*/
|
||||||
public function testSmartyTemplateObject() {
|
public function testSmartyTemplateObject() {
|
||||||
|
$this->expectException(SmartyCompilerException::class);
|
||||||
$this->smarty->display('string:{$smarty.template_object}');
|
$this->smarty->display('string:{$smarty.template_object}');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -435,9 +435,9 @@ class CompileFunctionTest extends PHPUnit_Smarty
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test handling of function names that are a security risk
|
* Test handling of function names that are a security risk
|
||||||
* @expectedException SmartyCompilerException
|
|
||||||
*/
|
*/
|
||||||
public function testIllegalFunctionName() {
|
public function testIllegalFunctionName() {
|
||||||
|
$this->expectException(SmartyCompilerException::class);
|
||||||
$this->smarty->fetch('string:{function name=\'rce(){};echo "hi";function \'}{/function}');
|
$this->smarty->fetch('string:{function name=\'rce(){};echo "hi";function \'}{/function}');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user