From fb5cfe32ec711a040d16114b358f2ee84ceac3c5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Mar 2021 08:38:11 +0100 Subject: switch to phpunit9 --- php-react-event-loop.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'php-react-event-loop.spec') diff --git a/php-react-event-loop.spec b/php-react-event-loop.spec index 9e123a9..9e52a07 100644 --- a/php-react-event-loop.spec +++ b/php-react-event-loop.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-react-event-loop # -# Copyright (c) 2017-2020 Shawn Iwinski +# Copyright (c) 2017-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -44,7 +44,7 @@ BuildArch: noarch %if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit7 +BuildRequires: phpunit9 ## phpcompatinfo (computed from version 1.1.0) BuildRequires: php-date BuildRequires: php-pcntl @@ -127,10 +127,17 @@ require '%{buildroot}%{phpdir}/React/EventLoop/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\EventLoop\\', __DIR__.'/tests'); BOOTSTRAP +: for phpunit8/9 +find tests -name \*.php \ + -exec sed \ + -e 's/function setUp()/function setUp():void/' \ + -e 's/function tearDown()/function tearDown():void/' \ + -i {} \; + : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit7) -for PHP_EXEC in "" php72 php73 php74 ; do +PHPUNIT=$(which phpunit9) +for PHP_EXEC in "" php73 php74 php80; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 @@ -154,6 +161,7 @@ exit $RETURN_CODE %changelog * Wed Nov 4 2020 Remi Collet - 1.1.1-1 - update to 1.1.1 +- switch to phpunit9 * Sat Dec 14 2019 Shawn Iwinski - 1.1.0-1 - Update to 1.1.0 (RHBZ #1599719) -- cgit