Index: .travis.yml
===================================================================
--- .travis.yml	(revision 11673)
+++ .travis.yml	(working copy)
@@ -118,12 +118,18 @@
 # before_script: Failures in this section will result in build status 'errored'
 before_script:
   - export PATH="$HOME/.composer/vendor/bin:$PATH"
-  - |
-    if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
-      composer global require "phpunit/phpunit=5.7.*"
-    elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
-      composer global require "phpunit/phpunit=4.8.*"
-    fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]]; then composer global require --dev phpunit/phpunit ^4; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.4" ]]; then composer global require --dev phpunit/phpunit ^4; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer global require --dev phpunit/phpunit ^4; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer global require --dev phpunit/phpunit ^5; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "4.4" ]]; then composer global require --dev phpunit/phpunit ^5; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "4.5" ]]; then composer global require --dev phpunit/phpunit ^5; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "4.6" ]]; then composer global require --dev phpunit/phpunit ^5; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "4.7" ]]; then composer global require --dev phpunit/phpunit ^6; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "4.8" ]]; then composer global require --dev phpunit/phpunit ^6; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" && $WP_VERSION == "master" ]]; then composer global require --dev phpunit/phpunit ^6; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer global require --dev phpunit/phpunit ^6; fi
+  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then composer global require --dev phpunit/phpunit ^6; fi
   - npm install
 # Run tests
 script: grunt $BP_TRAVISCI
