mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Improving compatobility method detection in paintError, so the failing line and method is correctly pointed out in the reporter
This commit is contained in:
parent
72959e7872
commit
01e36ce2c4
1 changed files with 7 additions and 1 deletions
|
@ -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 "<li class='fail'>\n";
|
||||
echo "<span>Failed</span>";
|
||||
|
|
Loading…
Add table
Reference in a new issue