protected function 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

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Constraint/IsIdentical.php, line 145

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);
}