10000 Merge branch '2.7' into 2.8 · symfony/symfony@00f87ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 00f87ac

Browse files
Merge branch '2.7' into 2.8
* 2.7: [VarDumper] Fix extra whitespace
2 parents 4d2cfd0 + ca0fdf8 commit 00f87ac

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,17 @@ public function testCollectHtml()
8787
$file = __FILE__;
8888
if (PHP_VERSION_ID >= 50400) {
8989
$xOutput = <<<EOTXT
90-
<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>:
90+
<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>:
9191
<span class=sf-dump-num>123</span>
9292
</pre>
93-
9493
EOTXT;
9594
} else {
9695
$len = strlen("DumpDataCollectorTest.php on line {$line}:");
9796
$xOutput = <<<EOTXT
98-
<pre class=sf-dump id=sf-dump data-indent-pad=" ">"<span class=sf-dump-str title="{$len} characters">DumpDataCollectorTest.php on line {$line}:</span>"
97+
<pre class=sf-dump id=sf-dump data-indent-pad=" ">"<span class=sf-dump-str title="{$len} characters">DumpDataCollectorTest.php on line {$line}:</span>"
9998
</pre>
10099
<pre class=sf-dump id=sf-dump data-indent-pad=" "><span class=sf-dump-num>123</span>
101100
</pre>
102-
103101
EOTXT;
104102
}
105103

@@ -111,7 +109,7 @@ public function testCollectHtml()
111109
$output = preg_replace('#<(script|style).*?</\1>#s', '', $output);
112110
$output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output);
113111

114-
$this->assertSame($xOutput, $output);
112+
$this->assertSame($xOutput, trim($output));
115113
$this->assertSame(1, $collector->getDumpsCount());
116114
$collector->serialize();
117115
}

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ function isCtrlKey(e) {
288288
};
289289
290290
})(document);
291-
</script>
292-
<style>
291+
</script><style>
293292
pre.sf-dump {
294293
display: block;
295294
white-space: pre;

0 commit comments

Comments
 (0)
0