File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 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:
127127
128128:method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpEquals `
129129 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.
131131
132132:method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpMatchesFormat `
133133 is like the previous method but accepts placeholders in the expected dump,
@@ -152,10 +152,19 @@ Example::
152152 ]
153153 EOTXT;
154154
155+ // if the first argument is a string, it must be the whole expected dump
155156 $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);
156161 }
157162 }
158163
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+
159168Dump Examples and Output
160169------------------------
161170
You can’t perform that action at this time.
0 commit comments