You are here

protected function PHPUnit_Framework_Constraint_IsEmpty::failureDescription in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php \PHPUnit_Framework_Constraint_IsEmpty::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/IsEmpty.php, line 53

Class

PHPUnit_Framework_Constraint_IsEmpty
Constraint that checks whether a variable is empty().

Code

protected function failureDescription($other) {
  $type = gettype($other);
  return sprintf('%s %s %s', $type[0] == 'a' || $type[0] == 'o' ? 'an' : 'a', $type, $this
    ->toString());
}