From 22f08fe592d14afb364baf0cb0f22ce9d1e17390 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 29 Oct 2020 14:52:15 +0100 Subject: run test suite with both phpunit 8 and 9 --- php-mockery.spec | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'php-mockery.spec') 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 - 1.3.3-1 - update to 1.3.3 -- cgit