Skip to content

Commit

Permalink
Improving compatobility method detection in paintError, so the failin…
Browse files Browse the repository at this point in the history
…g line and method is correctly pointed out in the reporter
  • Loading branch information
lorenzo committed May 13, 2010
1 parent 72959e7 commit 01e36ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -264,7 +264,13 @@ public function paintDocumentEnd() {
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 "<li class='fail'>\n";
echo "<span>Failed</span>";
Expand Down

0 comments on commit 01e36ce

Please sign in to comment.