summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--55.patch38
-rw-r--r--php-zendframework-zend-test.spec19
2 files changed, 47 insertions, 10 deletions
diff --git a/55.patch b/55.patch
new file mode 100644
index 0000000..f5e5c95
--- /dev/null
+++ b/55.patch
@@ -0,0 +1,38 @@
+From 5818e1abe0155401b066a416e98d3623973004c7 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sun, 29 Oct 2017 10:53:40 +0100
+Subject: [PATCH] Prefer expectException over deprecated setExpectedException
+
+---
+ src/PHPUnit/Controller/AbstractControllerTestCase.php | 3 ++-
+ test/ExpectedExceptionTrait.php | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/PHPUnit/Controller/AbstractControllerTestCase.php b/src/PHPUnit/Controller/AbstractControllerTestCase.php
+index eda6eed68..b60ad9228 100644
+--- a/src/PHPUnit/Controller/AbstractControllerTestCase.php
++++ b/src/PHPUnit/Controller/AbstractControllerTestCase.php
+@@ -490,7 +490,8 @@ public function assertApplicationException($type, $message = null)
+ $this->getApplication()->getMvcEvent()->setParam('exception', null);
+ }
+
+- if (method_exists($this, 'setExpectedException')) {
++ if (!method_exists($this, 'expectException')) {
++ // For old PHPUnit 4
+ $this->setExpectedException($type, $message);
+ } else {
+ $this->expectException($type);
+diff --git a/test/ExpectedExceptionTrait.php b/test/ExpectedExceptionTrait.php
+index 25793dda1..4270ec8b7 100644
+--- a/test/ExpectedExceptionTrait.php
++++ b/test/ExpectedExceptionTrait.php
+@@ -16,7 +16,8 @@
+ */
+ public function expectedException($exceptionClass, $message = '')
+ {
+- if (method_exists($this, 'setExpectedException')) {
++ if (!method_exists($this, 'expectException')) {
++ // For old PHPUnit 4
+ $this->setExpectedException($exceptionClass, $message);
+ return;
+ }
diff --git a/php-zendframework-zend-test.spec b/php-zendframework-zend-test.spec
index e7a9afb..1727fd5 100644
--- a/php-zendframework-zend-test.spec
+++ b/php-zendframework-zend-test.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 3.1.0
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,7 +30,8 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-test/pull/55.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -134,6 +135,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -143,8 +145,6 @@ mv LICENSE.md LICENSE
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{php_home}/Zend/
cp -pr src %{buildroot}%{php_home}/Zend/%{library}
@@ -172,7 +172,7 @@ for cmd in php php56 php70 php71; do
$cmd %{_bindir}/phpunit --verbose || ret=1
fi
done
-for cmd in php php70 php71; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
$cmd %{_bindir}/phpunit6 --verbose || ret=1
fi
@@ -183,12 +183,7 @@ exit $ret
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -197,6 +192,10 @@ rm -rf %{buildroot}
%changelog
+* Sun Oct 29 2017 Remi Collet <remi@remirepo.net> - 3.1.0-3
+- fix FTBFS from Koschei, add fix for recent PHPUnit from
+ https://github.com/zendframework/zend-test/pull/55
+
* Tue May 2 2017 Remi Collet <remi@remirepo.net> - 3.1.0-1
- Update to 3.1.0
- run test suite against phpunit v5 and v6