2014-09-07 18:53:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# usage: travis.sh before|after
|
|
|
|
|
|
|
|
if [ $1 == 'before' ]; then
|
|
|
|
|
2016-09-13 23:55:58 +00:00
|
|
|
# Composer install fails in PHP 5.2
|
2017-01-16 18:48:59 +00:00
|
|
|
[[ ${TRAVIS_PHP_VERSION} == '5.2' ]] && exit;
|
2014-09-07 18:53:33 +00:00
|
|
|
|
2016-09-13 23:55:58 +00:00
|
|
|
# No Xdebug and therefore no coverage in PHP 5.3
|
2017-01-16 18:48:59 +00:00
|
|
|
[[ ${TRAVIS_PHP_VERSION} == '5.3' ]] && exit;
|
2016-09-13 23:55:58 +00:00
|
|
|
|
2017-07-20 14:55:45 +00:00
|
|
|
if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then
|
2017-03-14 17:17:35 +00:00
|
|
|
composer global require "phpunit/phpunit=4.8.*"
|
2017-07-20 14:55:45 +00:00
|
|
|
else
|
2017-07-20 16:32:21 +00:00
|
|
|
composer global require "phpunit/phpunit=6.2.*"
|
2017-03-14 17:17:35 +00:00
|
|
|
fi
|
|
|
|
|
2014-09-07 18:53:33 +00:00
|
|
|
fi
|