Skip to content

Commit

Permalink
Merge pull request #177 from spatie/fix/dump-header
Browse files Browse the repository at this point in the history
[2.x] Fixes dump header on different symfony versions
  • Loading branch information
freekmurze authored Jan 12, 2024
2 parents 7430569 + 8c52639 commit 005e1e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Recorders/DumpRecorder/HtmlDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

class HtmlDumper extends BaseHtmlDumper
{
protected $dumpHeader = '';
public function __construct($output = null, string $charset = null, int $flags = 0)
{
parent::__construct($output, $charset, $flags);

$this->setDumpHeader('');
}

public function dumpVariable($variable): string
{
Expand Down
9 changes: 9 additions & 0 deletions tests/Recorders/DumpRecorder/HtmlDumperTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use Spatie\LaravelIgnition\Recorders\DumpRecorder\HtmlDumper;

it('has an empty string as dump header', function () {
$dumpHeader = (fn () => $this->getDumpHeader())->call(new HtmlDumper);

expect($dumpHeader)->toBe('');
});

0 comments on commit 005e1e7

Please sign in to comment.