You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/PHPUnit/PHPMatcherAssertionsTest.php
+4-10
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,7 @@ public function test_it_throws_an_expectation_failed_exception_if_a_value_does_n
25
25
} catch (\Exception$e) {
26
26
$this->assertSame(
27
27
<<<'ERROR'
28
-
Failed asserting that '{"foo":"bar"}' matches given pattern.
29
-
Pattern: '{"foo": "@integer@"}'
30
-
Error: Value "bar" does not match pattern "@integer@" at path: "[foo]"
31
-
Backtrace:
32
-
Empty.
28
+
Failed asserting that Value "bar" does not match pattern "@integer@" at path: "[foo]".
33
29
ERROR,
34
30
$e->getMessage()
35
31
);
@@ -45,10 +41,8 @@ public function test_it_throws_an_expectation_failed_exception_if_a_value_does_n
45
41
} catch (\Exception$e) {
46
42
$this->assertSame(
47
43
<<<ERROR
48
-
Failed asserting that '{"foo":"bar"}' matches given pattern.
49
-
Pattern: '{"foo": "@integer@"}'
50
-
Error: Value "bar" does not match pattern "@integer@" at path: "[foo]"
51
-
Backtrace:
44
+
Failed asserting that Value "bar" does not match pattern "@integer@" at path: "[foo]"
45
+
Backtrace:
52
46
#1 Matcher Coduo\PHPMatcher\Matcher matching value "{"foo":"bar"}" with "{"foo":"@integer@"}" pattern
53
47
#2 Matcher Coduo\PHPMatcher\Matcher\ChainMatcher (all) matching value "{"foo":"bar"}" with "{"foo":"@integer@"}" pattern
54
48
#3 Matcher Coduo\PHPMatcher\Matcher\ChainMatcher (scalars) can match pattern "{"foo":"@integer@"}"
@@ -150,7 +144,7 @@ public function test_it_creates_a_constraint_for_stubs() : void
150
144
* #...
151
145
* #35 Matcher Coduo\PHPMatcher\Matcher error: integer "42" is not a valid string.
152
146
*/
153
-
$this->expectExceptionMessageMatches("/Expectation failed for method name is \"getTitle\" when invoked zero or more times\nParameter 0 for invocation stdClass::getTitle\(42\) does not match expected value.\nFailed asserting that 42 matches given pattern.\nPattern: '@string@'\nError: integer \"42\" is not a valid string.\nBacktrace: \n(.*)/");
147
+
$this->expectExceptionMessageMatches("/Expectation failed for method name is \"getTitle\" when invoked zero or more times\nParameter 0 for invocation stdClass::getTitle\(42\) does not match expected value.\nFailed asserting that integer \"42\" is not a valid string../");
0 commit comments