diff --git a/expectException b/expectException new file mode 100644 index 000000000..e69de29bb diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index 4af37e167..bbb8b4e80 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -385,10 +385,10 @@ public function testNotTrustedUri() /** * 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}'); + $this->smarty->display('string:{$smarty.template_object}'); } }