disable closure for PHP 5.2

This commit is contained in:
uwetews
2017-05-21 18:54:13 +02:00
parent 03900cec3a
commit 6fcb23196a

View File

@@ -191,7 +191,11 @@ class FilterTest extends PHPUnit_Smarty
*/ */
public function testRegisteredPreFilterClosure() public function testRegisteredPreFilterClosure()
{ {
$this->smarty->registerFilter(Smarty::FILTER_PRE, function ($input) { if (version_compare(PHP_VERSION,'5.3','<'))
{
$this->markTestSkipped('does not run for PHP 5.2');
}
$this->smarty->registerFilter(Smarty::FILTER_PRE, function ($input) {
return '{$foo}' . $input; return '{$foo}' . $input;
}); });
$tpl = $this->smarty->createTemplate('eval:{" hello world"}'); $tpl = $this->smarty->createTemplate('eval:{" hello world"}');