mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 18:57:22 +01:00
Do not nest expectations
This commit is contained in:
@ -56,7 +56,7 @@ final class Expectation
|
|||||||
*/
|
*/
|
||||||
public function and(mixed $value): Expectation
|
public function and(mixed $value): Expectation
|
||||||
{
|
{
|
||||||
return new self($value);
|
return $value instanceof static ? $value : new self($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user