File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ This will provide you with two new assertions:
127
127
128
128
:method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpEquals `
129
129
verifies that the dump of the variable given as the second argument matches
130
- the expected dump provided as a string in the first argument.
130
+ the expected dump provided as the first argument.
131
131
132
132
:method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpMatchesFormat `
133
133
is like the previous method but accepts placeholders in the expected dump,
@@ -152,10 +152,19 @@ Example::
152
152
]
153
153
EOTXT;
154
154
155
+ // if the first argument is a string, it must be the whole expected dump
155
156
$this->assertDumpEquals($expectedDump, $testedVar);
157
+
158
+ // if the first argument is not a string, assertDumpEquals() dumps it
159
+ // and compares it with the dump of the second argument
160
+ $this->assertDumpEquals($testedVar, $testedVar);
156
161
}
157
162
}
158
163
164
+ .. versionadded :: 4.1
165
+ The possibility of passing non-string variables as the first argument of
166
+ ``assertDumpEquals() `` was introduced in Symfony 4.1.
167
+
159
168
Dump Examples and Output
160
169
------------------------
161
170
You can’t perform that action at this time.
0 commit comments