File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,26 @@ current PHP SAPI:
73
73
#. From time to time, run ``composer global update `` to have the latest
74
74
bug fixes.
75
75
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
+
76
96
DebugBundle and Twig Integration
77
97
--------------------------------
78
98
You can’t perform that action at this time.
0 commit comments