From 13ef11ef472bd60689ce63f0ee9d3aabb58dc85e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 25 Mar 2021 14:10:02 +0100 Subject: switch to phpunit8 --- php-laminas-permissions-acl.spec | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/php-laminas-permissions-acl.spec b/php-laminas-permissions-acl.spec index 0a655e9..29fc87f 100644 --- a/php-laminas-permissions-acl.spec +++ b/php-laminas-permissions-acl.spec @@ -1,6 +1,6 @@ # remirepo/Fedora spec file for php-laminas-permissions-acl # -# Copyright (c) 2015-2020 Remi Collet +# Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -24,7 +24,7 @@ Name: php-%{gh_project} Version: 2.7.2 -Release: 1%{?dist} +Release: 3%{?dist} Summary: %{namespace} Framework %{library}/%{subproj} component License: BSD @@ -50,8 +50,8 @@ BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 2.7. BuildRequires: php-laminas-zendframework-bridge BuildRequires: php-laminas-servicemanager %endif -%global phpunit %{_bindir}/phpunit7 -BuildRequires: phpunit7 >= 7.1.5 +%global phpunit %{_bindir}/phpunit8 +BuildRequires: phpunit8 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -146,12 +146,20 @@ require "%{buildroot}%{php_home}/Zend/%{library}/%{subproj}/autoload.php"; exit (class_exists("\\Zend\\%{library}\\%{subproj}\\Acl") ? 0 : 1); ' +: for phpunit8/9 +find test -name \*.php \ + -exec sed \ + -e 's/function setUp()/function setUp():void/' \ + -e 's/function tearDown()/function tearDown():void/' \ + -i {} \; + + : upstream test suite ret=0 -for cmdarg in "php %{phpunit}" php72 php73 php74; do +for cmdarg in "php %{phpunit}" php73 php74 php80; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit8} --verbose || ret=1 fi done exit $ret @@ -173,6 +181,9 @@ exit $ret %changelog +* Thu Mar 25 2021 Remi Collet - 2.7.2-3 +- switch to phpunit8 + * Wed Sep 23 2020 Remi Collet - 2.7.2-1 - update to 2.7.2 -- cgit