summaryrefslogtreecommitdiffstats
path: root/php-mock-phpunit2.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-mock-phpunit2.spec')
-rw-r--r--php-mock-phpunit2.spec128
1 files changed, 96 insertions, 32 deletions
diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec
index 4401195..95a7c11 100644
--- a/php-mock-phpunit2.spec
+++ b/php-mock-phpunit2.spec
@@ -1,20 +1,21 @@
# remirepo/fedora spec file for php-mock-phpunit2
#
-# Copyright (c) 2016-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2016-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 7df4bd123ce196bbba19f142c4906c20be8ec546
+%global gh_commit e1f7e795990b00937376e345883ea68ca3bda7e0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_date 2024-02-11
%global gh_owner php-mock
%global gh_project php-mock-phpunit
%global with_tests 0%{!?_without_tests:1}
%global major 2
Name: php-mock-phpunit%{major}
-Version: 2.5.0
+Version: 2.10.0
Release: 1%{?dist}
Summary: Mock built-in PHP functions with PHPUnit.
@@ -27,41 +28,41 @@ BuildRequires: php(language) >= 7
%if %{with_tests}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2 with php-composer(php-mock/php-mock-integration) < 3)
-BuildRequires: (php-composer(php-mock/php-mock) >= 2.1.1 with php-composer(php-mock/php-mock) < 3)
-# remirepo:4
+BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2.3 with php-composer(php-mock/php-mock-integration) < 3)
+BuildRequires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3)
+# From composer.json "require-dev": {
+# "mockery/mockery": "^1.3.6"
+BuildRequires: (php-composer(mockery/mockery) >= 1.3.6 with php-composer(mockery/mockery) < 2)
+# remirepo:5
%else
-BuildRequires: php-mock-integration2
-BuildRequires: php-mock2 >= 2.1.1
-%endif
-BuildRequires: phpunit6
-%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
-BuildRequires: phpunit7
+BuildRequires: php-mock-integration2 >= 2.3
+BuildRequires: php-mock2 >= 2.2
+BuildRequires: php-mockery >= 1.3.6
%endif
-%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
BuildRequires: phpunit8
-%endif
+BuildRequires: phpunit9
+BuildRequires: phpunit10 >= 10.0.17
+# TODO phpunit11 but requires php 8.2
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# from composer.json, "require": {
# "php": ">=7",
-# "phpunit/phpunit": "^6 || ^7 || ^8",
-# "php-mock/php-mock-integration": "^2"
+# "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10.0.17 || ^11",
+# "php-mock/php-mock-integration": "^2.2.1"
# "conflict": {
# "phpunit/phpunit-mock-objects": "3.2.0"
Requires: php(language) >= 7
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (phpunit6 or phpunit7 or phpunit8)
-Requires: (php-composer(php-mock/php-mock-integration) >= 2 with php-composer(php-mock/php-mock-integration) < 3)
-Requires: (php-composer(php-mock/php-mock) >= 2.1.1 with php-composer(php-mock/php-mock) < 3)
-# remirepo:5
+Recommends: (phpunit8 or phpunit9 or phpunit10)
+Requires: (php-composer(php-mock/php-mock-integration) >= 2.3 with php-composer(php-mock/php-mock-integration) < 3)
+Requires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3)
+# remirepo:4
%else
-Requires: phpunit6
-Requires: php-mock-integration2
-Requires: php-mock2 >= 2.1.1
+Requires: php-mock-integration2 >= 2.3
+Requires: php-mock2 >= 2.2
%endif
# From phpcompatinfo report from version 2.1.0
# only Core
@@ -112,19 +113,14 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{_datadir}/php/phpmock%{major}/phpunit/autoload.php';
require_once '%{_datadir}/php/phpmock%{major}/autoload.php';
+require_once '%{_datadir}/php/Mockery1/autoload.php';
EOF
ret=0
-: Run upstream test suite with phpunit6
-for cmd in php php71 php72 php73; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit6 --verbose || ret=1
- fi
-done
if [ -x %{_bindir}/phpunit7 ]; then
: Run upstream test suite with phpunit7
-for cmd in php php71 php72 php73 php74; do
+for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd %{_bindir}/phpunit7 --verbose || ret=1
fi
@@ -133,12 +129,43 @@ fi
if [ -x %{_bindir}/phpunit8 ]; then
: Run upstream test suite with phpunit8
-for cmd in php php72 php73 php74; do
+for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd %{_bindir}/phpunit8 --verbose || ret=1
fi
done
fi
+
+if [ -x %{_bindir}/phpunit9 ]; then
+: Run upstream test suite with phpunit9
+for cmd in php php80 php81 php82 php83; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit9 --verbose || ret=1
+ fi
+done
+fi
+
+if [ -x %{_bindir}/phpunit10 ]; then
+: Run upstream test suite with phpunit10
+for cmd in php php81 php82 php83; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit10 \
+ --filter '^((?!(testPreserveArgumentDefaultValue)).)*$' \
+ || ret=1
+ fi
+done
+fi
+
+if [ -x %{_bindir}/phpunit11 ]; then
+: Run upstream test suite with phpunit11
+for cmd in php php82 php83; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit11 \
+ --filter '^((?!(testPreserveArgumentDefaultValue)).)*$' \
+ || ret=1
+ fi
+done
+fi
exit $ret
%else
: bootstrap build with test suite disabled
@@ -155,6 +182,43 @@ exit $ret
%changelog
+* Mon Feb 12 2024 Remi Collet <remi@remirepo.net> - 2.10.0-1
+- update to 2.10.0 (no change)
+- raise dependency on php-mock-integration2 2.3
+- allow phpunit11
+
+* Mon Dec 4 2023 Remi Collet <remi@remirepo.net> - 2.9.0-1
+- update to 2.9.0
+
+* Mon Oct 30 2023 Remi Collet <remi@remirepo.net> - 2.8.0-1
+- update to 2.8.0
+
+* Tue Jun 13 2023 Remi Collet <remi@remirepo.net> - 2.7.2-1
+- update to 2.7.2 (no change)
+
+* Tue Mar 21 2023 Remi Collet <remi@remirepo.net> - 2.7.1-1
+- update to 2.7.1
+
+* Tue Mar 7 2023 Remi Collet <remi@remirepo.net> - 2.7.0-1
+- update to 2.7.0
+- raise dependency on php-mock-integration2 2.2.1
+- allow phpunit10
+- drop build dependency on phpspec/prophecy
+- add build dependency on mockery/mockery
+
+* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 2.6.1-1
+- update to 2.6.1
+- add build dependency on phpspec/prophecy
+
+* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 2.6.0-4
+- drop dependency on phpunit6
+
+* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 2.6.0-1
+- update to 2.6.0
+- raise dependency on php-mock2 2.2
+- raise dependency on php-mock-integration2 2.1
+- allow phpunit9
+
* Mon Oct 7 2019 Remi Collet <remi@remirepo.net> - 2.5.0-1
- update to 2.5.0