File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/Symfony/Component/VarDumper/Tests/Dumper Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,33 @@ public function provideDumpWithCommaFlagTests()
171
171
yield array ($ expected , CliDumper::DUMP_TRAILING_COMMA );
172
172
}
173
173
174
+ public function testDumpWithCommaFlagsAndExceptionCodeExcerpt ()
175
+ {
176
+ $ dumper = new CliDumper (null , null , CliDumper::DUMP_TRAILING_COMMA );
177
+ $ dumper ->setColors (false );
178
+ $ cloner = new VarCloner ();
179
+
180
+ $ ex = new \RuntimeException ('foo ' );
181
+
182
+ $ dump = $ dumper ->dump ($ cloner ->cloneVar ($ ex )->withRefHandles (false ), true );
183
+
184
+ $ this ->assertStringMatchesFormat (<<<'DUMP'
185
+ RuntimeException {
186
+ %A,
187
+ trace: {
188
+ .%A/CliDumperTest.php:%d {
189
+ ›
190
+ › $ex = new \RuntimeException('foo');
191
+ ›
192
+ },
193
+ %A,
194
+ },
195
+ }
196
+
197
+ DUMP
198
+ , $ dump );
199
+ }
200
+
174
201
/**
175
202
* @requires extension xml
176
203
*/
You can’t perform that action at this time.
0 commit comments