public function testHtmlDump() { if (\
ini_get('xdebug.file_link_format'
) ||
get_cfg_var('xdebug.file_link_format'
)) { $this->
markTestSkipped('A custom file_link_format is defined.'
);
} $e =
$this->
getTestException(1
);
ExceptionCaster::
$srcContext = -1;
$cloner =
new VarCloner();
$cloner->
setMaxItems(1
);
$dumper =
new HtmlDumper();
$dumper->
setDumpHeader('<foo></foo>'
);
$dumper->
setDumpBoundaries('<bar>', '</bar>'
);
$dump =
$dumper->
dump($cloner->
cloneVar($e)->
withRefHandles(false
), true
);
$expectedDump = <<<'EODUMP'
<foo></foo><bar><span class=sf-dump-note>Exception</span> {<samp data-depth=1 class=sf-dump-expanded>
#<span class=sf-dump-protected title="Protected property">message</span>: "<span class=sf-dump-str>1</span>"
#<span class=sf-dump-protected title="Protected property">code</span>: <span class=sf-dump-num>0</span>
#<span class=sf-dump-protected title="Protected property">file</span>: "<span class=sf-dump-str title="%sExceptionCasterTest.php
%d characters"><span class="sf-dump-ellipsis sf-dump-ellipsis-path">%s%eVarDumper</span><span class="sf-dump-ellipsis sf-dump-ellipsis-path">%e</span>Tests%eCaster%eExceptionCasterTest.php</span>"
#<span class=sf-dump-protected title="Protected property">line</span>: <span class=sf-dump-num>%d</span>
<span class=sf-dump-meta>trace</span>: {<samp data-depth=2 class=sf-dump-compact>
<span class=sf-dump-meta title="%sExceptionCasterTest.php
Stack level %d."><span class="sf-dump-ellipsis sf-dump-ellipsis-path">%s%eVarDumper</span><span class="sf-dump-ellipsis sf-dump-ellipsis-path">%e</span>Tests%eCaster%eExceptionCasterTest.php</span>:<span class=sf-dump-num>%d</span>
…%d
</samp>}
</samp>}
</bar>