diff options
| author | Thomas BACCELLI <tbaccelli@gmail.com> | 2021-10-20 16:00:21 +0200 |
|---|---|---|
| committer | Thomas A. Hirsch <thomas.hirsch@vema-eg.de> | 2022-01-18 15:56:23 +0100 |
| commit | 323aefa89f32844ba35b9a10cda2a9d003998211 (patch) | |
| tree | 747b638563e103fa5764aa9e8818b2b9346f5f2a /tests/UnitTests | |
| parent | 277648b81cb49cfd1449bc876f874c2421e97af2 (diff) | |
| download | smarty-323aefa89f32844ba35b9a10cda2a9d003998211.tar.gz smarty-323aefa89f32844ba35b9a10cda2a9d003998211.tar.bz2 smarty-323aefa89f32844ba35b9a10cda2a9d003998211.zip | |
Fix phpunit warning
Diffstat (limited to 'tests/UnitTests')
| -rw-r--r-- | tests/UnitTests/SecurityTests/SecurityTest.php | 2 | ||||
| -rw-r--r-- | tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
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}'); } |
