diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/cake/tests/lib/reporter/cake_html_reporter.php index 9f6f8eea7..ff128bc2f 100755 --- a/cake/tests/lib/reporter/cake_html_reporter.php +++ b/cake/tests/lib/reporter/cake_html_reporter.php @@ -264,7 +264,13 @@ class CakeHtmlReporter extends CakeBaseReporter { public function paintFail($message) { $context = $message->getTrace(); $realContext = $context[3]; - $context = $context[2]; + $class = new ReflectionClass($realContext['class']); + if ($class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase') { + $realContext = $context[4]; + $context = $context[3]; + } else { + $context = $context[2]; + } echo "
  • \n"; echo "Failed";