protected function PHPUnit_Framework_Constraint_IsIdentical::failureDescription in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php \PHPUnit_Framework_Constraint_IsIdentical::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.
Parameters
mixed $other Evaluated value or object.:
Return value
string
Overrides PHPUnit_Framework_Constraint::failureDescription
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ IsIdentical.php, line 101
Class
- PHPUnit_Framework_Constraint_IsIdentical
- Constraint that asserts that one value is identical to another.
Code
protected function failureDescription($other) {
if (is_object($this->value) && is_object($other)) {
return 'two variables reference the same object';
}
if (is_string($this->value) && is_string($other)) {
return 'two strings are identical';
}
return parent::failureDescription($other);
}