Fix continuous integration tests for PHP 7.1.

There was 1 failure:
    1) CurlTest\CurlTest::testRequiredOptionCurlOptReturnTransferEmitsWarning
    Failed asserting that exception of type "Error" matches expected exception "\PHPUnit\Framework\Error\Warning".
    Message was: "Call to undefined method CurlTest\CurlTest::expectWarning()" at
    ./tests/PHPCurlClass/PHPCurlClassTest.php:3036
This commit is contained in:
Zach Borboa
2020-02-17 14:44:45 -08:00
parent 2fd406a500
commit 702e4a13ea
+6
View File
@@ -51,6 +51,11 @@ phpunit_shim() {
sed -i'' -e"s/${find}/${replace}/" "$(pwd)/tests/PHPCurlClass/PHP"*
}
phpunit_v7_5_shim() {
# Fix "Call to undefined method CurlTest\CurlTest::expectWarning()".
sed -i'' -e"/->expectWarning(/d" "$(pwd)/tests/PHPCurlClass/PHPCurlClassTest.php"
}
set -x
echo "TRAVIS_PHP_VERSION: ${TRAVIS_PHP_VERSION}"
php -r "var_dump(phpversion());"
@@ -125,6 +130,7 @@ elif [[ "${TRAVIS_PHP_VERSION}" == "5.6" ]]; then
elif [[ "${TRAVIS_PHP_VERSION}" == "7.0" ]]; then
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
elif [[ "${TRAVIS_PHP_VERSION}" == "7.1" ]]; then
phpunit_v7_5_shim
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
elif [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &