Skip to content

Commit

Permalink
Fixes dump header on different symfony versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jan 12, 2024
1 parent 7430569 commit 8c52639
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 8c52639

Please sign in to comment.