summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-react-event-loop.spec16
1 files changed, 12 insertions, 4 deletions
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 <shawn@iwin.ski>
+# Copyright (c) 2017-2021 Shawn Iwinski <shawn@iwin.ski>
#
# 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 <remi@remirepo.net> - 1.1.1-1
- update to 1.1.1
+- switch to phpunit9
* Sat Dec 14 2019 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-1
- Update to 1.1.0 (RHBZ #1599719)