Constraint that asserts that a string is valid JSON.
◆ failureDescription()
PHPUnit\Framework\Constraint\IsJson::failureDescription |
( |
|
$other | ) |
|
|
protected |
Returns the description of the failure
The beginning of failure messages is "Failed asserting that" in most cases. This method should return the second part of that sentence.
- Parameters
-
mixed | $other | evaluated value or object |
- Exceptions
-
Reimplemented from PHPUnit\Framework\Constraint\Constraint.
◆ matches()
PHPUnit\Framework\Constraint\IsJson::matches |
( |
|
$other | ) |
|
|
protected |
Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
- Parameters
-
mixed | $other | value or object to evaluate |
Reimplemented from PHPUnit\Framework\Constraint\Constraint.
◆ toString()
PHPUnit\Framework\Constraint\IsJson::toString |
( |
| ) |
|
The documentation for this class was generated from the following file:
- vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php