woocommerce/tests/bin/travis.sh

19 lines
429 B
Bash
Raw Normal View History

#!/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
[[ ${TRAVIS_PHP_VERSION} == '5.2' ]] && exit;
2016-09-13 23:55:58 +00:00
# No Xdebug and therefore no coverage in PHP 5.3
[[ ${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
fi