diff --git a/PHPUnit/Framework/Constraint/IsInstanceOf.php b/PHPUnit/Framework/Constraint/IsInstanceOf.php index cb5491e09f8..a9e2e3b3003 100644 --- a/PHPUnit/Framework/Constraint/IsInstanceOf.php +++ b/PHPUnit/Framework/Constraint/IsInstanceOf.php @@ -103,8 +103,9 @@ public function fail($other, $description, $not = FALSE) { throw new PHPUnit_Framework_ExpectationFailedException( sprintf( - 'Failed asserting that %s is %san instance of class "%s".', + '%sFailed asserting that %s is %san instance of class "%s".', + !empty($description) ? $description . "\n" : '', PHPUnit_Util_Type::toString($other, TRUE), $not ? 'not ' : '', $this->className