From 15ae03f4abc91d79cc3207686289e7bfff99900a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 9 Mar 2017 19:13:25 +0000 Subject: [PATCH] Build/Test tools: Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis. This avoids fatal errors while the tests remain incompatible with PHPUnit 6, which was recently introduced on Travis. See #39822, #40086 git-svn-id: https://develop.svn.wordpress.org/trunk@40255 602fd350-edb4-49c9-b593-d223f7449a82 --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 851073fe4d..e289444920 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,6 +52,13 @@ before_install: fi before_script: - stable='^[0-9\.]+$'; if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then phpenv config-rm xdebug.ini; fi +- 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 - npm install -g npm - npm install -g grunt-cli - npm install @@ -61,6 +68,7 @@ before_script: - php --version - npm --version - node --version +- phpunit --version script: grunt $WP_TRAVISCI notifications: slack: