mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
feat: adds "Illuminate\Testing\TestResponse" behavior to snapshot testing
This commit is contained in:
@ -808,6 +808,7 @@ final class Expectation
|
|||||||
is_string($this->value) => $this->value,
|
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(),
|
||||||
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'),
|
default => InvalidExpectationValue::expected('Stringable|string'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user