From 2ecc5306863b3b38f4e646a0fedc8cdc9febf6f2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 26 Mar 2021 08:56:49 +0100 Subject: switch to phpunit8 --- php-theseer-fDOMDocument.spec | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/php-theseer-fDOMDocument.spec b/php-theseer-fDOMDocument.spec index 2831941..0e38f5b 100644 --- a/php-theseer-fDOMDocument.spec +++ b/php-theseer-fDOMDocument.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-theseer-fDOMDocument # -# Copyright (c) 2013-2019 Remi Collet +# Copyright (c) 2013-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -17,7 +17,7 @@ Name: php-theseer-fDOMDocument Version: 1.6.6 -Release: 6%{?dist} +Release: 11%{?dist} Summary: An Extension to PHP standard DOM License: BSD @@ -27,11 +27,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildArch: noarch BuildRequires: php(language) >= 5.3.3 # For test -%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 -%global phpunit %{_bindir}/phpunit6 -%else -%global phpunit %{_bindir}/phpunit -%endif +%global phpunit %{_bindir}/phpunit8 BuildRequires: %{phpunit} BuildRequires: php-dom BuildRequires: php-libxml @@ -76,10 +72,17 @@ cp -pr src %{buildroot}%{php_home}/%{gh_project} %check ret=0 -for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do +: for phpunit8/9 +find tests -name \*.php \ + -exec sed \ + -e 's/function setUp()/function setUp():void/' \ + -e 's/function tearDown()/function tearDown():void/' \ + -i {} \; + +for cmd in "php %{phpunit}" php73 php74 php80; do if which $cmd; then set $cmd - $1 ${2:-%{_bindir}/phpunit6} \ + $1 ${2:-%{_bindir}/phpunit8} \ --bootstrap %{buildroot}%{php_home}/%{gh_project}/autoload.php \ --verbose || ret=1 fi @@ -102,6 +105,9 @@ fi %changelog +* Fri Mar 26 2021 Remi Collet - 1.6.6-11 +- switch to phpunit8 + * Wed Feb 20 2019 Remi Collet - 1.6.6-6 - cleanup for EL-8 -- cgit