Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice

* Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice because we will drop support for this in the next major release
This commit is contained in:
Simon Wisselink
2024-03-18 14:44:29 +01:00
committed by GitHub
parent e2cb9873ff
commit c7a271323b
13 changed files with 151 additions and 22 deletions

View File

@@ -46,7 +46,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty
*/
public function testClearAllAssignInTemplate()
{
error_reporting((error_reporting() & ~(E_NOTICE | E_USER_NOTICE | E_WARNING)));
$this->smarty->setErrorReporting($this->smarty->error_reporting & ~(E_NOTICE | E_USER_NOTICE | E_WARNING));
$this->_tpl->clearAllAssign();
$this->assertEquals('foobar', $this->smarty->fetch($this->_tpl));
}
@@ -56,7 +56,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty
*/
public function testClearAllAssignInData()
{
error_reporting((error_reporting() & ~(E_NOTICE | E_USER_NOTICE | E_WARNING)));
$this->smarty->setErrorReporting($this->smarty->error_reporting & ~(E_NOTICE | E_USER_NOTICE | E_WARNING));
$this->_data->clearAllAssign();
$this->assertEquals('fooblar', $this->smarty->fetch($this->_tpl));
}
@@ -66,7 +66,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty
*/
public function testClearAllAssignInSmarty()
{
error_reporting((error_reporting() & ~(E_NOTICE | E_USER_NOTICE | E_WARNING)));
$this->smarty->setErrorReporting($this->smarty->error_reporting & ~(E_NOTICE | E_USER_NOTICE | E_WARNING));
$this->smarty->clearAllAssign();
$this->assertEquals('barblar', $this->smarty->fetch($this->_tpl));
}