mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge branch 'master' into nested-higher-order-expectations
# Conflicts: # tests/.snapshots/success.txt
This commit is contained in:
@ -64,6 +64,14 @@ final class Expectation
|
||||
return new self($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new expectation with the decoded JSON value.
|
||||
*/
|
||||
public function json(): Expectation
|
||||
{
|
||||
return $this->toBeJson()->and(json_decode($this->value, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump the expectation value and end the script.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user