diff --git a/src/Expectation.php b/src/Expectation.php index 7703ebb8..1099daff 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -76,6 +76,22 @@ final class Expectation return $this->toBeJson()->and($value); } + /** + * Dump the expectation value. + * + * @return self + */ + public function dump(mixed ...$arguments): self + { + if (function_exists('dump')) { + dump($this->value, ...$arguments); + } else { + var_dump($this->value); + } + + return $this; + } + /** * Dump the expectation value and end the script. *