From 7109dfbf7d8ab3fd0a2eda9a7b6a4d4fd37b6443 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Tue, 22 Jan 2019 23:28:39 +0100 Subject: [PATCH] Use PHPUnit 6 for PHP 7.0 --- .travis/before-script.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis/before-script.sh b/.travis/before-script.sh index a4a7410..2f0cc75 100755 --- a/.travis/before-script.sh +++ b/.travis/before-script.sh @@ -13,5 +13,10 @@ composer install --no-ansi --no-progress --no-interaction --prefer-source; if [ "${PHPCS}" = '1' ]; then composer require --dev 'squizlabs/php_codesniffer=2.*'; else - composer require --dev 'phpunit/phpunit=^7'; + PHP_VERSION="$(php -r 'echo phpversion();')"; + if [ "${PHP_VERSION:0:3}" == '7.0' ]; then + composer require --dev 'phpunit/phpunit=^6'; + else + composer require --dev 'phpunit/phpunit=^7'; + fi fi