Disable tests which do not run on PHP 5.4 and below

This commit is contained in:
Uwe Tews
2017-11-06 04:32:19 +01:00
parent 8a6f2493c6
commit ae900c9ebe

View File

@@ -56,6 +56,10 @@ class PhpFunctionTest extends PHPUnit_Smarty
*/ */
public function testEmpty2() public function testEmpty2()
{ {
if (version_compare(phpversion(), '5.5', '<')) {
$this->markTestSkipped('runs only on PHP > 5.5');
}
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smarty->assign('var', array(null, $this->smarty->assign('var', array(null,
false, false,
@@ -77,6 +81,9 @@ class PhpFunctionTest extends PHPUnit_Smarty
*/ */
public function testEmpty3() public function testEmpty3()
{ {
if (version_compare(phpversion(), '5.5', '<')) {
$this->markTestSkipped('runs only on PHP > 5.5');
}
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smarty->assign('var', array(true, $this->smarty->assign('var', array(true,
(int) 1, (int) 1,
@@ -96,6 +103,10 @@ class PhpFunctionTest extends PHPUnit_Smarty
*/ */
public function testEmpty4() public function testEmpty4()
{ {
if (version_compare(phpversion(), '5.5', '<')) {
$this->markTestSkipped('runs only on PHP > 5.5');
}
$this->smarty->disableSecurity(); $this->smarty->disableSecurity();
$this->smarty->assign('var', new TestIsset()); $this->smarty->assign('var', new TestIsset());
$expected = ' true , false , false , true , true , true , false '; $expected = ' true , false , false , true , true , true , false ';