function Constraint::failureDescription
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.
To provide additional failure information additionalFailureDescription can be used.
3 calls to Constraint::failureDescription()
- Constraint::fail in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Constraint.php - Throws an exception for the given compared value and test description.
- IsIdentical::failureDescription in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ IsIdentical.php - Returns the description of the failure.
- IsIdentical::failureDescription in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ IsIdentical.php - Returns the description of the failure.
51 methods override Constraint::failureDescription()
- ArrayHasKey::failureDescription in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Traversable/ ArrayHasKey.php - Returns the description of the failure.
- BrowserCookieValueSame::failureDescription in vendor/
symfony/ browser-kit/ Test/ Constraint/ BrowserCookieValueSame.php - BrowserHasCookie::failureDescription in vendor/
symfony/ browser-kit/ Test/ Constraint/ BrowserHasCookie.php - CommandIsSuccessful::failureDescription in vendor/
symfony/ console/ Tester/ Constraint/ CommandIsSuccessful.php - Returns the description of the failure.
- Count::failureDescription in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Cardinality/ Count.php - Returns the description of the failure.
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Constraint.php, line 132
Class
- Constraint
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Framework\ConstraintCode
protected function failureDescription(mixed $other) : string {
return Exporter::export($other, true) . ' ' . $this->toString(true);
}