From 3da825e4b89c0ba27f168c0123d3de68cedafd1c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 26 Mar 2021 14:33:33 +0100 Subject: more fix for PHP 8 --- phpunit7.spec | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'phpunit7.spec') diff --git a/phpunit7.spec b/phpunit7.spec index f34df11..3d45be7 100644 --- a/phpunit7.spec +++ b/phpunit7.spec @@ -28,7 +28,7 @@ Name: %{pk_project}%{ver_major} Version: %{ver_major}.%{ver_minor}.%{ver_patch} -Release: 4%{?dist} +Release: 5%{?dist} Summary: The PHP Unit Testing framework version %{ver_major} License: BSD @@ -264,14 +264,17 @@ for cmd in php php73 php74 php80; do if which $cmd; then OPT="--testsuite=unit --no-coverage" VER=$($cmd -r 'echo PHP_VERSION_ID;'); - if [ $VER -ge 80000 ]; then - FILTER="testStaticAttributesBackupPre|testResourceTypeCanBeAsserted|testNotResourceTypeCanBeAsserted|testCreateMockFromWsdl" - FILTER="$FILTER|testCreateNamespacedMockFromWsdl|testCreateTwoMocksOfOneWsdlFile|testCreateMockOfWsdlFileWithSpecialChars" - FILTER="$FILTER|testCreateTestForConstructorlessTestClass|testCountTraversable|testConstraintTraversableCheckForObjectIdentityForDefaultCase" - OPT="$OPT --filter '^((?!($FILTER)).)*$'" - elif [ $VER -ge 70400 ]; then - OPT="$OPT --filter '^((?!(testStaticAttributesBackupPre)).)*$'" + if [ $VER -ge 70400 ]; then + FILTER="testStaticAttributesBackupPre" + fi + if [ $VER -ge 80000 ]; then + FILTER="$FILTER|testResourceTypeCanBeAsserted|testNotResourceTypeCanBeAsserted" + FILTER="$FILTER|testCountTraversable|testConstraintTraversableCheckForObjectIdentityForDefaultCase" + OPT="$OPT --filter '^((?!($FILTER)).)*$'" + fi + if [ -n "$FILTER" ]; then + OPT="$OPT --filter '^((?!($FILTER)).)*$'" fi $cmd ./phpunit $OPT --verbose || ret=1 fi @@ -290,6 +293,9 @@ exit $ret %changelog +* Fri Mar 26 2021 Remi Collet - 7.5.20-5 +- more fix for PHP 8 + * Thu Mar 25 2021 Remi Collet - 7.5.20-4 - recommend using a supported version -- cgit