diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index dfaffa67..d68ac3d4 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -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}'); } diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php index ca3e3714..61a08583 100644 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php @@ -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}'); }