summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-03 08:34:54 +0200
committerRemi Collet <remi@remirepo.net>2018-10-03 08:34:54 +0200
commit26ccb5580b95738aefab5056ab868482e0bd99e7 (patch)
tree839e88aea610088354f52b4cde5b78ba52f22fa2
parent5a3df5f6fd9bb19ba884912cea4bb6797f0f502c (diff)
update to 1.2.0
switch to phpunit7
-rw-r--r--composer.json3
-rw-r--r--php-mockery.spec41
2 files changed, 26 insertions, 18 deletions
diff --git a/composer.json b/composer.json
index 12f23f6..4d7c96c 100644
--- a/composer.json
+++ b/composer.json
@@ -36,8 +36,7 @@
"hamcrest/hamcrest-php": "~2.0"
},
"require-dev": {
- "phpunit/phpunit": "~5.7.10|~6.5",
- "phpdocumentor/phpdocumentor": "^2.9"
+ "phpunit/phpunit": "~5.7.10|~6.5|~7.0"
},
"autoload": {
"psr-0": {
diff --git a/php-mockery.spec b/php-mockery.spec
index 45a50e7..1d33c79 100644
--- a/php-mockery.spec
+++ b/php-mockery.spec
@@ -7,7 +7,7 @@
#
# Please preserve changelog entries
#
-%global gh_commit 99e29d3596b16dabe4982548527d5ddf90232e99
+%global gh_commit 100633629bf76d57430b86b7098cd6beb996a35a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner mockery
%global gh_project mockery
@@ -16,7 +16,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-mockery
-Version: 1.1.0
+Version: 1.2.0
Release: 1%{?dist}
Summary: Mockery is a simple but flexible PHP mock object framework
@@ -30,20 +30,18 @@ Patch0: %{gh_project}-tests.patch
BuildArch: noarch
%if %{with_tests}
-# From composer.json, "require-dev": {
-# "phpunit/phpunit": "~5.7.10|~6.5",
-# "phpdocumentor/phpdocumentor": "^2.9"
-%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
-%global phpunit %{_bindir}/phpunit6
-BuildRequires: phpunit6 >= 6.5
-%else
-%global phpunit %{_bindir}/phpunit
-BuildRequires: php-phpunit-PHPUnit >= 5.7.10
-%endif
BuildRequires: php(language) >= 5.6.0
+# From composer.json, "require-dev": {
+# "phpunit/phpunit": "~5.7.10|~6.5|~7.0"
+# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7
BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0 with php-composer(hamcrest/hamcrest-php) < 3)
+# remirepo:5
%else
+%global phpunit %{_bindir}/phpunit
+BuildRequires: php-phpunit-PHPUnit >= 5.7.10
BuildRequires: php-hamcrest2
%endif
# Autoloader
@@ -55,8 +53,10 @@ BuildRequires: php-fedora-autoloader-devel
# "lib-pcre": ">=7.0",
# "hamcrest/hamcrest-php": "~2.0"
Requires: php(language) >= 5.6.0
+# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0 with php-composer(hamcrest/hamcrest-php) < 3)
+# remirepo:3
%else
Requires: php-hamcrest2
%endif
@@ -110,16 +110,21 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major}
: Use installed tree and our autoloader
export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major}
-phpab --output tests/classmap.php tests/Mockery/Stubs/
+phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery
: Run upstream test suite
ret=0
-for cmd in "php %{phpunit}" php70 php71 php72 php73; do
+for cmd in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72 php73; do
if which $cmd; then
set $cmd
- $1 ${2:-%{_bindir}/phpunit6} \
+ # see .travis.yml
+ if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 7 ]
+ then SUITE="Mockery Test Suite PHP56"
+ else SUITE="Mockery Test Suite"
+ fi
+ $1 ${2:-%{_bindir}/phpunit7} \
--no-coverage \
- --verbose || ret=1
+ --verbose --testsuite="$SUITE"
fi
done
exit $ret
@@ -136,6 +141,10 @@ exit $ret
%changelog
+* Wed Oct 3 2018 Remi Collet <remi@remirepo.net> - 1.2.0-1
+- update to 1.2.0
+- switch to phpunit7
+
* Sun May 13 2018 Remi Collet <remi@remirepo.net> - 1.1.0-1
- update to 1.1.0