mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
skip closure on php 5.2
This commit is contained in:
@@ -18,7 +18,7 @@ class FilterTest extends PHPUnit_Smarty
|
|||||||
public $loadSmartyBC = true;
|
public $loadSmartyBC = true;
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$this->setUpSmarty(__DIR__);
|
$this->setUpSmarty(dirname(__FILE__));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInit()
|
public function testInit()
|
||||||
@@ -101,6 +101,9 @@ class FilterTest extends PHPUnit_Smarty
|
|||||||
*/
|
*/
|
||||||
public function testRegisteredPreFilterClosure()
|
public function testRegisteredPreFilterClosure()
|
||||||
{
|
{
|
||||||
|
if (version_compare(PHP_VERSION, '5.2', '<=')) {
|
||||||
|
$this->markTestSkipped('closure not available');
|
||||||
|
}
|
||||||
$this->smarty->registerFilter(Smarty::FILTER_PRE, function($input) {return '{$foo}' . $input;});
|
$this->smarty->registerFilter(Smarty::FILTER_PRE, function($input) {return '{$foo}' . $input;});
|
||||||
$tpl = $this->smarty->createTemplate('eval:{" hello world"}');
|
$tpl = $this->smarty->createTemplate('eval:{" hello world"}');
|
||||||
$tpl->assign('foo', 'buh');
|
$tpl->assign('foo', 'buh');
|
||||||
|
Reference in New Issue
Block a user