Skip to content

Commit

Permalink
upgrade to PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
jmckenna committed Jul 7, 2024
1 parent 78e3a3b commit 9870817
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,19 @@ python -m http.server &> /dev/null &
# get PHPUnit
echo "PHP version"
php -v
cd php && curl -LO https://phar.phpunit.de/phpunit-11.phar
echo "PHPUnit version"
php phpunit-11.phar --version
PHPVersion=$(php -v|grep --only-matching --perl-regexp "(PHP )\d+\.\\d+\.\\d+");
PHPVersion=${PHPVersion:4:3};
if [ ${PHPVersion} > 8.1 ]; then
cd php && curl -LO https://phar.phpunit.de/phpunit-11.phar
echo "PHPUnit version"
php phpunit-11.phar --version
PHPUnitVersion=11
else
cd php && curl -LO https://phar.phpunit.de/phpunit-10.phar
echo "PHPUnit version"
php phpunit-10.phar --version
PHPUnitVersion=10
fi
echo "PHP includes"
php-config --includes

Expand Down
4 changes: 2 additions & 2 deletions msautotest/php/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

if test -z $PHP_MAPSCRIPT_SO; then
php phpunit-11.phar .
php phpunit-$PHPUnitVersion.phar .
exit $?
else
php -d "extension=$PHP_MAPSCRIPT_SO" phpunit-11.phar .
php -d "extension=$PHP_MAPSCRIPT_SO" phpunit-$PHPUnitVersion.phar .
exit $?
fi

0 comments on commit 9870817

Please sign in to comment.