Fix phpunit warning

This commit is contained in:
Thomas BACCELLI
2021-10-20 16:00:21 +02:00
committed by Thomas A. Hirsch
parent 277648b81c
commit 323aefa89f
2 changed files with 2 additions and 2 deletions

View File

@@ -366,9 +366,9 @@ class SecurityTest extends PHPUnit_Smarty
/**
* In security mode, accessing $smarty.template_object should be illegal.
* @expectedException SmartyCompilerException
*/
public function testSmartyTemplateObject() {
$this->expectException(SmartyCompilerException::class);
$this->smarty->display('string:{$smarty.template_object}');
}

View File

@@ -435,9 +435,9 @@ class CompileFunctionTest extends PHPUnit_Smarty
/**
* Test handling of function names that are a security risk
* @expectedException SmartyCompilerException
*/
public function testIllegalFunctionName() {
$this->expectException(SmartyCompilerException::class);
$this->smarty->fetch('string:{function name=\'rce(){};echo "hi";function \'}{/function}');
}