8000 [VarDumper] Exception code excerpt has ending commas · ogizanagi/symfony@1f624ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f624ae

Browse files
committed
[VarDumper] Exception code excerpt has ending commas
1 parent 4a68775 commit 1f624ae

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,33 @@ public function provideDumpWithCommaFlagTests()
171171
yield array($expected, CliDumper::DUMP_TRAILING_COMMA);
172172
}
173173

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+
174201
/**
175202
* @requires extension xml
176203
*/

0 commit comments

Comments
 (0)
0