File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,26 @@ current PHP SAPI:
7373 #. From time to time, run ``composer global update `` to have the latest
7474 bug fixes.
7575
76+ Using VarDumper in your PHPUnit test suite
77+ ------------------------------------------
78+
79+ Since Symfony 2.7, the VarDumper component provides
80+ :class: `a trait <Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait> `
81+ that can help writting some of your tests for PHPUnit.
82+ By adding::
83+
84+ use \Symfony\Component\VarDumper\Test\VarDumperTestTrait;
85+
86+ at the beginning of your test class declaration, you'll gain two new assertions:
87+
88+ :method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpEquals `
89+ verifies that the dump of the variable given as second argument matches the
90+ expected dump provided as a string in the first argument.
91+
92+ :method: `Symfony\\ Component\\ VarDumper\\ Test\\ VarDumperTestTrait::assertDumpMatchesFormat `
93+ is like the previous method but accepts placeholders in the expected dump,
94+ based on the ``assertStringMatchesFormat `` method provided by PHPUnit.
95+
7696DebugBundle and Twig Integration
7797--------------------------------
7898
You can’t perform that action at this time.
0 commit comments