From 683910bff4334d2940f0e5a85a87f8b5bac596cb Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 20 Feb 2023 18:10:51 +0000 Subject: [PATCH] fix: improves dump message --- src/KernelDump.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/KernelDump.php b/src/KernelDump.php index ebf1ad3d..dac8bafb 100644 --- a/src/KernelDump.php +++ b/src/KernelDump.php @@ -61,6 +61,7 @@ final class KernelDump private function flush(): void { View::renderUsing($this->output); + if ($this->isOpeningHeadline($this->buffer)) { $this->buffer = implode(PHP_EOL, array_slice(explode(PHP_EOL, $this->buffer), 2)); } @@ -69,7 +70,9 @@ final class KernelDump if ($this->isInternalError($this->buffer)) { $type = 'ERROR'; - $this->buffer = str_replace('An error occurred inside PHPUnit.', '', $this->buffer); + $this->buffer = str_replace( + sprintf('An error occurred inside PHPUnit.%s%sMessage: ', PHP_EOL, PHP_EOL), '', $this->buffer, + ); } $this->buffer = trim($this->buffer);