diff --git a/tests/lib/FieldType/Converter/MethodCallCountConstraint.php b/tests/lib/FieldType/Converter/MethodCallCountConstraint.php index dd24af45..10fe9dc6 100644 --- a/tests/lib/FieldType/Converter/MethodCallCountConstraint.php +++ b/tests/lib/FieldType/Converter/MethodCallCountConstraint.php @@ -73,17 +73,18 @@ public function toString() * * @throws PHPUnit_Framework_ExpectationFailedException */ - public function verify() + public function verify($test = null) { $count = $this->getInvocationCount(); if ($count != $this->expectedCount) { - throw new PHPUnit_Framework_ExpectationFailedException( + throw new ExpectationFailedException( sprintf( 'Methods of class was expected to be called %d times, ' . - 'actually called %d times.', + 'actually called %d times.' . ($test ? "\nWhile testing '%s'." : ''), $this->expectedCount, - $count + $count, + $test ) ); } diff --git a/tests/lib/FieldType/Converter/RichTextTest.php b/tests/lib/FieldType/Converter/RichTextTest.php index a66b52e5..02187f02 100644 --- a/tests/lib/FieldType/Converter/RichTextTest.php +++ b/tests/lib/FieldType/Converter/RichTextTest.php @@ -232,7 +232,7 @@ public function testConvert($inputFilePath, $outputFilePath, $logFilePath) $richText->setImageContentTypes([27]); $result = $richText->convert($inputDocument, true, true); - $this->methodCallCountConstraint->verify(); + $this->methodCallCountConstraint->verify(basename($inputFilePath)); if ($result === false && !file_exists($outputFilePath)) { return;