mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Added dump helper to Expectation class
This commit is contained in:
@ -76,6 +76,22 @@ final class Expectation
|
||||
return $this->toBeJson()->and($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump the expectation value.
|
||||
*
|
||||
* @return self<TValue>
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user