Skip to content

Commit

Permalink
Fixing fatal errors that would arise if the Exception did not have a …
Browse files Browse the repository at this point in the history
…parent class.
  • Loading branch information
markstory committed Jun 22, 2010
1 parent 7ac76f3 commit 22baf7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -265,7 +265,11 @@ public function paintFail($message) {
$context = $message->getTrace();
$realContext = $context[3];
$class = new ReflectionClass($realContext['class']);
$deeper = $class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase';

$deeper = false;
if ($class->getParentClass()) {
$deeper = $class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase';
}
$deeper = $deeper || !$class->isSubclassOf('PHPUnit_Framework_TestCase');
if ($deeper) {
$realContext = $context[4];
Expand Down

0 comments on commit 22baf7f

Please sign in to comment.