diff --git a/.travis.yml b/.travis.yml index 9d4abe82f5c..b6cd8bce848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,12 +22,6 @@ matrix: before_script: - export PATH="$HOME/.composer/vendor/bin:$PATH" - - | - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then - composer global require "phpunit/phpunit=5.7.*" - else - composer global require "phpunit/phpunit=4.8.*" - fi - bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION - bash tests/bin/travis.sh before diff --git a/tests/bin/travis.sh b/tests/bin/travis.sh index 1ed7426b53f..4e45f6c8150 100755 --- a/tests/bin/travis.sh +++ b/tests/bin/travis.sh @@ -9,6 +9,12 @@ if [ $1 == 'before' ]; then # No Xdebug and therefore no coverage in PHP 5.3 [[ ${TRAVIS_PHP_VERSION} == '5.3' ]] && exit; + if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then + composer global require "phpunit/phpunit=5.7.*" + else + composer global require "phpunit/phpunit=4.8.*" + fi + composer self-update composer install --no-interaction