diff --git a/tests/before_script.sh b/tests/before_script.sh index e0ea326..d18187e 100755 --- a/tests/before_script.sh +++ b/tests/before_script.sh @@ -91,6 +91,14 @@ EOF sleep 5 sudo service nginx start phpunit_shim + + # Use an older version of PHPUnit for HHVM builds so that unit tests can be + # started. HHVM 3.18 (PHP_VERSION=PHP 5.6.99-hhvm) is the last version to + # run on Trusty yet PHPUnit 6 requires PHP 7.0 or PHP 7.1. + # Avoids error: + # This version of PHPUnit is supported on PHP 7.0 and PHP 7.1. + # You are using PHP 5.6.99-hhvm (/usr/bin/hhvm). + composer require phpunit/phpunit:5.7 elif [[ "${TRAVIS_PHP_VERSION}" == "nightly" ]]; then php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ & fi