summaryrefslogtreecommitdiffstats
path: root/a669a8e3569e62e542812e0620f3d0f7e53870b2.patch
blob: 8646b7090a99c407df75bd31e2ca302e80b8f4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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()
             );