From ae900c9ebe6e30a5a5680f76bb12acee4a2431d0 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Mon, 6 Nov 2017 04:32:19 +0100 Subject: [PATCH] Disable tests which do not run on PHP 5.4 and below --- .../ValueTests/PHPfunctions/PhpFunctionTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php index 0556cee4..8892a542 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php @@ -56,6 +56,10 @@ class PhpFunctionTest extends PHPUnit_Smarty */ public function testEmpty2() { + if (version_compare(phpversion(), '5.5', '<')) { + $this->markTestSkipped('runs only on PHP > 5.5'); + } + $this->smarty->disableSecurity(); $this->smarty->assign('var', array(null, false, @@ -77,6 +81,9 @@ class PhpFunctionTest extends PHPUnit_Smarty */ public function testEmpty3() { + if (version_compare(phpversion(), '5.5', '<')) { + $this->markTestSkipped('runs only on PHP > 5.5'); + } $this->smarty->disableSecurity(); $this->smarty->assign('var', array(true, (int) 1, @@ -96,6 +103,10 @@ class PhpFunctionTest extends PHPUnit_Smarty */ public function testEmpty4() { + if (version_compare(phpversion(), '5.5', '<')) { + $this->markTestSkipped('runs only on PHP > 5.5'); + } + $this->smarty->disableSecurity(); $this->smarty->assign('var', new TestIsset()); $expected = ' true , false , false , true , true , true , false ';