From d14fa74b648afb7fac3711b5b14a746d05758a03 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 10 Jul 2024 18:30:34 +0200 Subject: [PATCH] Add accessor for the rendered test view contents --- packages/testing/src/Support/TestView.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/testing/src/Support/TestView.php b/packages/testing/src/Support/TestView.php index dff6dd38698..691baf2e5b0 100644 --- a/packages/testing/src/Support/TestView.php +++ b/packages/testing/src/Support/TestView.php @@ -179,6 +179,14 @@ public function assertTextIs(string $value): static return $this; } + /** + * Get the rendered view as a string. + */ + public function getRendered(): string + { + return $this->rendered; + } + #[NoReturn] public function dd(bool $writeHtml = true): void {