Skip to content

Commit 005e1e7

Browse files
authored
Merge pull request #177 from spatie/fix/dump-header
[2.x] Fixes dump header on different symfony versions
2 parents 7430569 + 8c52639 commit 005e1e7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/Recorders/DumpRecorder/HtmlDumper.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

99
class HtmlDumper extends BaseHtmlDumper
1010
{
11-
protected $dumpHeader = '';
11+
public function __construct($output = null, string $charset = null, int $flags = 0)
12+
{
13+
parent::__construct($output, $charset, $flags);
14+
15+
$this->setDumpHeader('');
16+
}
1217

1318
public function dumpVariable($variable): string
1419
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
use Spatie\LaravelIgnition\Recorders\DumpRecorder\HtmlDumper;
4+
5+
it('has an empty string as dump header', function () {
6+
$dumpHeader = (fn () => $this->getDumpHeader())->call(new HtmlDumper);
7+
8+
expect($dumpHeader)->toBe('');
9+
});

0 commit comments

Comments
 (0)