diff options
| -rw-r--r-- | php-sabre-xml2.spec | 15 | 
1 files changed, 11 insertions, 4 deletions
diff --git a/php-sabre-xml2.spec b/php-sabre-xml2.spec index 72bce3e..81c1796 100644 --- a/php-sabre-xml2.spec +++ b/php-sabre-xml2.spec @@ -52,7 +52,13 @@ BuildRequires:  php-spl  # From composer.json, "require-dev": {  #        "phpstan/phpstan": "^0.12",  #        "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0" -BuildRequires:  phpunit8 >= 8.5 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 +BuildRequires:  phpunit9 +%global phpunit %{_bindir}/phpunit9 +%else +BuildRequires:  phpunit8 +%global phpunit %{_bindir}/phpunit8 +%endif  %endif  # Autoloader  BuildRequires:  php-fedora-autoloader-devel @@ -136,9 +142,10 @@ cd tests  : Run upstream test suite against installed library  ret=0 -for cmd in php php72 php73 php74 php80; do -  if which $cmd; then -    $cmd %{_bindir}/phpunit8 || ret=1 +for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do +  if which $cmdarg; then +    set $cmdarg +    $1 ${2:-%{_bindir}/phpunit9} || ret=1    fi  done  exit $ret  | 
