Skip to content

Commit 7d59f67

Browse files
committed
Fix unit test failure due to unresolvable dependencies.
Error 1: $ composer require phpunit/phpunit:5.7.* Your requirements could not be resolved to an installable set of packages. Error 2: Fatal error: Uncaught Error: unknown class PHPUnit_Framework_TestCase in PHPCurlClassTest.php:9
1 parent 8156a3f commit 7d59f67

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/before_script.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ EOF
9595
root="${script_dir}/PHPCurlClass"
9696
sudo cp -v "${root}/"* "/usr/share/nginx/html/"
9797

98-
phpunit_shim
99-
10098
# Use an older version of PHPUnit for HHVM builds so that unit tests can be
10199
# started. HHVM 3.18 (PHP_VERSION=PHP 5.6.99-hhvm) is the last version to
102100
# run on Trusty yet PHPUnit 6 requires PHP 7.0 or PHP 7.1.
103101
# Avoids error:
104102
# This version of PHPUnit is supported on PHP 7.0 and PHP 7.1.
105103
# You are using PHP 5.6.99-hhvm (/usr/bin/hhvm).
106-
composer require phpunit/phpunit:5.7.*
104+
if [[ "${TRAVIS_PHP_VERSION}" == "hhvm" ]]; then
105+
phpunit_shim
106+
composer require phpunit/phpunit:5.7.*
107+
fi
107108
elif [[ "${TRAVIS_PHP_VERSION}" == "nightly" ]]; then
108109
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
109110
fi

0 commit comments

Comments
 (0)