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.spec9
1 files changed, 9 insertions, 0 deletions
diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec
index 2ac8823..798c5b8 100644
--- a/php-mock-phpunit2.spec
+++ b/php-mock-phpunit2.spec
@@ -25,13 +25,17 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildArch: noarch
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)
+# remirepo:3
%else
BuildRequires: php-mock-integration2
%endif
BuildRequires: phpunit6
+%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
BuildRequires: phpunit7
+%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -43,9 +47,11 @@ BuildRequires: php-composer(fedora/autoloader)
# "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)
Requires: (php-composer(php-mock/php-mock-integration) >= 2 with php-composer(php-mock/php-mock-integration) < 3)
+# remirepo:4
%else
Requires: phpunit6
Requires: php-mock-integration2
@@ -107,12 +113,15 @@ for cmd in php php70 php71 php72; do
$cmd %{_bindir}/phpunit6 --verbose || ret=1
fi
done
+
+%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
: Run upstream test suite with phpunit7
for cmd in php php71 php72; do
if which $cmd; then
$cmd %{_bindir}/phpunit7 --verbose || ret=1
fi
done
+%endif
exit $ret
%else
: bootstrap build with test suite disabled