mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-05 07:16:27 +00:00
Fix continuous integration tests for PHP 5.3.
Error message:
Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in [...]
This commit is contained in:
@@ -30,6 +30,10 @@ reload_nginx() {
|
||||
$superuser /etc/init.d/nginx restart
|
||||
}
|
||||
|
||||
php_v5_3_shim() {
|
||||
remove_double_colon_class_name_resolution
|
||||
}
|
||||
|
||||
phpunit_shim() {
|
||||
# -class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
# +class CurlTest extends \PHPUnit_Framework_TestCase
|
||||
@@ -51,6 +55,10 @@ phpunit_shim() {
|
||||
sed -i'' -e"s/${find}/${replace}/" "$(pwd)/tests/PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
remove_double_colon_class_name_resolution() {
|
||||
sed -i'' -e"/::class/d" "$(pwd)/tests/PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
remove_expectWarning() {
|
||||
# Fix "Call to undefined method CurlTest\CurlTest::expectWarning()".
|
||||
sed -i'' -e"/->expectWarning(/d" "$(pwd)/tests/PHPCurlClass/PHP"*
|
||||
@@ -129,6 +137,7 @@ EOF
|
||||
$superuser /etc/init.d/php5-fpm start
|
||||
reload_nginx
|
||||
phpunit_shim
|
||||
php_v5_3_shim
|
||||
elif [[ "${TRAVIS_PHP_VERSION}" == "5.4" ]]; then
|
||||
install_nginx
|
||||
use_php_fpm
|
||||
|
||||
Reference in New Issue
Block a user