From e541ee86fcea8e4c6d842c7976d487de431bd726 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sat, 17 Jun 2023 13:48:32 +0100 Subject: [PATCH] feat: adds "Illuminate\Testing\TestResponse" behavior to snapshot testing --- src/Mixins/Expectation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index e9da32dc..da6c2107 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -808,6 +808,7 @@ final class Expectation is_string($this->value) => $this->value, is_object($this->value) && method_exists($this->value, '__toString') => $this->value->__toString(), is_object($this->value) && method_exists($this->value, 'toString') => $this->value->toString(), + $this->value instanceof \Illuminate\Testing\TestResponse => $this->value->getContent(), // @phpstan-ignore-line default => InvalidExpectationValue::expected('Stringable|string'), };