Attempt to fix travis runs for (almost) all php versions supported

This commit is contained in:
Simon Wisselink
2020-09-11 11:07:03 +02:00
parent 3b0b48ed3e
commit ca2be225d6
4 changed files with 13 additions and 7 deletions

View File

@@ -4,19 +4,27 @@ sudo: false
dist: trusty
matrix:
install:
- travis_retry composer require phpunit/phpunit:^7.5
jobs:
include:
- php: 5.3 # Composer and PHPUnit require PHP 5.3.2+ to run, so we cannot test below 5.3
dist: precise # PHP 5.3 is supported only on Precise.
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.4
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.5
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.6
install: travis_retry composer require phpunit/phpunit:^5.7
- php: 7.0
install: travis_retry composer require phpunit/phpunit:^6.5
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly # PHP nightly build testing disabled because PHPUnit doesn't support PHP8 yet.
- php: nightly
fast_finish: true
allow_failures:
- php: nightly
@@ -31,8 +39,5 @@ before_script:
before_install:
- phpenv config-rm xdebug.ini || return 0
install:
- travis_retry composer install
script:
- ./phpunit.sh

View File

@@ -40,7 +40,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "6.4.1 || ^5.7 || ^4.8",
"phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8",
"smarty/smarty-lexer": "^3.1"
}
}

View File

@@ -16,7 +16,6 @@ if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Frame
class_alias('\PHPUnit\Framework\Error\Error', '\PHPUnit_Framework_Error_Error');
class_alias('\PHPUnit\Framework\Error\Warning', '\PHPUnit_Framework_Error_Warning');
class_alias('\PHPUnit\Framework\Error\Warning', '\PHPUnit_Framework_Error_Deprecated');
class_alias('\PHPUnit\Util\Configuration', '\PHPUnit_Util_Configuration');
}
require_once 'PHPUnit_Smarty.php';

View File

@@ -72,6 +72,8 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
} elseif (PHP_VERSION_ID >= 56000) {
$this->expectExceptionMessage("Undefined index: foo");
$this->expectException(PHPUnit_Framework_Error_Notice::class);
} else {
return; // skip this test
}
$e1 = error_reporting();
$this->assertEquals('undefined = ', $this->smarty->fetch('001_main.tpl'));