Merge branch '2.7' into 2.8
* 2.7: [VarDumper] Fix extra whitespace
This commit is contained in:
commit
00f87aca3a
@ -87,19 +87,17 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
|||||||
$file = __FILE__;
|
$file = __FILE__;
|
||||||
if (PHP_VERSION_ID >= 50400) {
|
if (PHP_VERSION_ID >= 50400) {
|
||||||
$xOutput = <<<EOTXT
|
$xOutput = <<<EOTXT
|
||||||
<pre class=sf-dump id=sf-dump data-indent-pad=" "><a href="test://{$file}:{$line}" title="{$file}"><span class=sf-dump-meta>DumpDataCollectorTest.php</span></a> on line <span class=sf-dump-meta>{$line}</span>:
|
<pre class=sf-dump id=sf-dump data-indent-pad=" "><a href="test://{$file}:{$line}" title="{$file}"><span class=sf-dump-meta>DumpDataCollectorTest.php</span></a> on line <span class=sf-dump-meta>{$line}</span>:
|
||||||
<span class=sf-dump-num>123</span>
|
<span class=sf-dump-num>123</span>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
EOTXT;
|
EOTXT;
|
||||||
} else {
|
} else {
|
||||||
$len = strlen("DumpDataCollectorTest.php on line {$line}:");
|
$len = strlen("DumpDataCollectorTest.php on line {$line}:");
|
||||||
$xOutput = <<<EOTXT
|
$xOutput = <<<EOTXT
|
||||||
<pre class=sf-dump id=sf-dump data-indent-pad=" ">"<span class=sf-dump-str title="{$len} characters">DumpDataCollectorTest.php on line {$line}:</span>"
|
<pre class=sf-dump id=sf-dump data-indent-pad=" ">"<span class=sf-dump-str title="{$len} characters">DumpDataCollectorTest.php on line {$line}:</span>"
|
||||||
</pre>
|
</pre>
|
||||||
<pre class=sf-dump id=sf-dump data-indent-pad=" "><span class=sf-dump-num>123</span>
|
<pre class=sf-dump id=sf-dump data-indent-pad=" "><span class=sf-dump-num>123</span>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
EOTXT;
|
EOTXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +109,7 @@ EOTXT;
|
|||||||
$output = preg_replace('#<(script|style).*?</\1>#s', '', $output);
|
$output = preg_replace('#<(script|style).*?</\1>#s', '', $output);
|
||||||
$output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output);
|
$output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output);
|
||||||
|
|
||||||
$this->assertSame($xOutput, $output);
|
$this->assertSame($xOutput, trim($output));
|
||||||
$this->assertSame(1, $collector->getDumpsCount());
|
$this->assertSame(1, $collector->getDumpsCount());
|
||||||
$collector->serialize();
|
$collector->serialize();
|
||||||
}
|
}
|
||||||
|
@ -288,8 +288,7 @@ return function (root) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
})(document);
|
})(document);
|
||||||
</script>
|
</script><style>
|
||||||
<style>
|
|
||||||
pre.sf-dump {
|
pre.sf-dump {
|
||||||
display: block;
|
display: block;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
Reference in New Issue
Block a user