summaryrefslogtreecommitdiffstats
path: root/php-mockery.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-29 14:52:15 +0100
committerRemi Collet <remi@remirepo.net>2020-10-29 14:52:15 +0100
commit22f08fe592d14afb364baf0cb0f22ce9d1e17390 (patch)
treedc5b195ae329f5f6af51c2d73b8d23cb99401596 /php-mockery.spec
parentef4b4cf7b1d26a6836c56e02185247d167af0b9b (diff)
run test suite with both phpunit 8 and 9
Diffstat (limited to 'php-mockery.spec')
-rw-r--r--php-mockery.spec30
1 files changed, 21 insertions, 9 deletions
diff --git a/php-mockery.spec b/php-mockery.spec
index f7dc646..6df64bd 100644
--- a/php-mockery.spec
+++ b/php-mockery.spec
@@ -117,17 +117,28 @@ phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tes
: Run upstream test suite
ret=0
-for cmd in "php %{phpunit}" php73 php74 php80; do
+
+for cmd in php php73 php74 php80; do
if which $cmd; then
- set $cmd
- # see .travis.yml
- if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 8 ]
- then SUITE="Mockery Test Suite PHP7"
- else SUITE="Mockery Test Suite PHP8"
+ if [ $($cmd -r 'echo PHP_MAJOR_VERSION;') -lt 8 ]
+ then
+ # see .travis.yml
+ SUITE="Mockery Test Suite PHP7"
+
+ if [ -x %{_bindir}/phpunit8 ] ; then
+ $cmd %{_bindir}/phpunit8 \
+ --no-coverage \
+ --verbose --testsuite="$SUITE" || ret=1
+ fi
+ else
+ SUITE="Mockery Test Suite PHP8"
+ fi
+
+ if [ -x %{_bindir}/phpunit9 ] ; then
+ $cmd %{_bindir}/phpunit9 \
+ --no-coverage \
+ --verbose --testsuite="$SUITE" || ret=1
fi
- $1 ${2:-%{_bindir}/phpunit9} \
- --no-coverage \
- --verbose --testsuite="$SUITE" || ret=1
fi
done
exit $ret
@@ -148,6 +159,7 @@ exit $ret
- update to 1.4.2
- raise dependency on PHP 7.3
- drop compatibility with old phpunit 5, 6 and 7
+- run test suite with both phpunit 8 and 9
* Mon Aug 17 2020 Remi Collet <remi@remirepo.net> - 1.3.3-1
- update to 1.3.3