mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 17:57:23 +01:00
Merge pull request #1017 from markhuot/patch-2
[2.x] Add `toSnapshot` early return
This commit is contained in:
@ -844,6 +844,7 @@ final class Expectation
|
||||
|
||||
$string = match (true) {
|
||||
is_string($this->value) => $this->value,
|
||||
is_object($this->value) && method_exists($this->value, 'toSnapshot') => $this->value->toSnapshot(),
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user