summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--a669a8e3569e62e542812e0620f3d0f7e53870b2.patch101
-rw-r--r--php-phpunit-mock-objects4.spec11
3 files changed, 117 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/a669a8e3569e62e542812e0620f3d0f7e53870b2.patch b/a669a8e3569e62e542812e0620f3d0f7e53870b2.patch
new file mode 100644
index 0000000..8646b70
--- /dev/null
+++ b/a669a8e3569e62e542812e0620f3d0f7e53870b2.patch
@@ -0,0 +1,101 @@
+From a669a8e3569e62e542812e0620f3d0f7e53870b2 Mon Sep 17 00:00:00 2001
+From: Sebastian Bergmann <sb@sebastian-bergmann.de>
+Date: Wed, 1 Nov 2017 08:08:42 +0100
+Subject: [PATCH] Update tests
+
+---
+ composer.json | 2 +-
+ tests/MockObjectTest.php | 39 +++++++++++++++++++--------------------
+ 2 files changed, 20 insertions(+), 21 deletions(-)
+
+diff --git a/composer.json b/composer.json
+index a31a583..5e68a36 100644
+--- a/composer.json
++++ b/composer.json
+@@ -26,7 +26,7 @@
+ "sebastian/exporter": "^3.0"
+ },
+ "require-dev": {
+- "phpunit/phpunit": "^6.0"
++ "phpunit/phpunit": "^6.4.3"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<6.0"
+diff --git a/tests/MockObjectTest.php b/tests/MockObjectTest.php
+index d7e74fb..a5ed90e 100644
+--- a/tests/MockObjectTest.php
++++ b/tests/MockObjectTest.php
+@@ -660,8 +660,8 @@ public function testVerificationOfMethodNameFailsWithoutParameters()
+ $this->fail('Expected exception');
+ } catch (ExpectationFailedException $e) {
+ $this->assertSame(
+- "Expectation failed for method name is equal to <string:right> when invoked 1 time(s).\n"
+- . "Method was expected to be called 1 times, actually called 0 times.\n",
++ 'Expectation failed for method name is equal to "right" when invoked 1 time(s).' . PHP_EOL .
++ 'Method was expected to be called 1 times, actually called 0 times.' . PHP_EOL,
+ $e->getMessage()
+ );
+ }
+@@ -685,8 +685,8 @@ public function testVerificationOfMethodNameFailsWithParameters()
+ $this->fail('Expected exception');
+ } catch (ExpectationFailedException $e) {
+ $this->assertSame(
+- "Expectation failed for method name is equal to <string:right> when invoked 1 time(s).\n"
+- . "Method was expected to be called 1 times, actually called 0 times.\n",
++ 'Expectation failed for method name is equal to "right" when invoked 1 time(s).' . PHP_EOL .
++ 'Method was expected to be called 1 times, actually called 0 times.' . PHP_EOL,
+ $e->getMessage()
+ );
+ }
+@@ -708,9 +708,9 @@ public function testVerificationOfMethodNameFailsWithWrongParameters()
+ $mock->right(['second']);
+ } catch (ExpectationFailedException $e) {
+ $this->assertSame(
+- "Expectation failed for method name is equal to <string:right> when invoked 1 time(s)\n"
+- . "Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.\n"
+- . 'Failed asserting that two arrays are equal.',
++ 'Expectation failed for method name is equal to "right" when invoked 1 time(s)' . PHP_EOL .
++ 'Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.' . PHP_EOL .
++ 'Failed asserting that two arrays are equal.',
+ $e->getMessage()
+ );
+ }
+@@ -720,17 +720,16 @@ public function testVerificationOfMethodNameFailsWithWrongParameters()
+ $this->fail('Expected exception');
+ } catch (ExpectationFailedException $e) {
+ $this->assertSame(
+- "Expectation failed for method name is equal to <string:right> when invoked 1 time(s).\n"
+- . "Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.\n"
+- . "Failed asserting that two arrays are equal.\n"
+- . "--- Expected\n"
+- . "+++ Actual\n"
+- . "@@ @@\n"
+- . " Array (\n"
+- . "- 0 => 'first'\n"
+- . "- 1 => 'second'\n"
+- . "+ 0 => 'second'\n"
+- . " )\n",
++ 'Expectation failed for method name is equal to "right" when invoked 1 time(s).' . PHP_EOL .
++ 'Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.' . PHP_EOL .
++ 'Failed asserting that two arrays are equal.' . PHP_EOL .
++ '--- Expected' . PHP_EOL .
++ '+++ Actual' . PHP_EOL .
++ '@@ @@' . PHP_EOL .
++ ' Array (' . PHP_EOL .
++ '- 0 => \'first\'' . PHP_EOL .
++ '- 1 => \'second\'' . PHP_EOL .
++ '+ 0 => \'second\'' . PHP_EOL,
+ $e->getMessage()
+ );
+ }
+@@ -799,8 +798,8 @@ public function testWithAnythingInsteadOfWithAnyParameters()
+ $this->fail('Expected exception');
+ } catch (ExpectationFailedException $e) {
+ $this->assertSame(
+- "Expectation failed for method name is equal to <string:right> when invoked 1 time(s)\n" .
+- "Parameter count for invocation SomeClass::right() is too low.\n" .
++ 'Expectation failed for method name is equal to "right" when invoked 1 time(s)' . PHP_EOL .
++ 'Parameter count for invocation SomeClass::right() is too low.' . PHP_EOL .
+ 'To allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.',
+ $e->getMessage()
+ );
diff --git a/php-phpunit-mock-objects4.spec b/php-phpunit-mock-objects4.spec
index 232e003..33b2876 100644
--- a/php-phpunit-mock-objects4.spec
+++ b/php-phpunit-mock-objects4.spec
@@ -24,7 +24,7 @@
%global ver_major 4
%global ver_minor 0
%global ver_patch 4
-%global specrel 1
+%global specrel 2
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
%else
@@ -43,6 +43,7 @@ Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commi
# Temporary workaround, under investigation
Patch0: %{gh_project}-4.0.0-rpm.patch
+Patch1: a669a8e3569e62e542812e0620f3d0f7e53870b2.patch
BuildArch: noarch
BuildRequires: php-fedora-autoloader-devel
@@ -55,8 +56,8 @@ BuildRequires: php-composer(doctrine/instantiator) >= 1.0.5
BuildRequires: php-composer(sebastian/exporter) < 4
BuildRequires: php-composer(sebastian/exporter) >= 3.0
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^6.0"
-BuildRequires: phpunit6
+# "phpunit/phpunit": "^6.4.3"
+BuildRequires: phpunit6 >= 6.4.3
%endif
# From composer.json, "require": {
@@ -95,6 +96,7 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}/autoload.php
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0
+%patch1 -p1
find . -name \*.orig -exec rm {} \; -print
@@ -151,6 +153,9 @@ exit $ret
%changelog
+* Fri Nov 3 2017 Remi Collet <remi@remirepo.net> - 4.0.4-2
+- fix FTBFS from Koschei, add upstream patch
+
* Fri Aug 4 2017 Remi Collet <remi@remirepo.net> - 4.0.4-1
- Update to 4.0.4
- raise dependency on phpunit/php-text-template 1.2.1