Skip to content

Commit cce752a

Browse files
BrianHenryIEmheap
authored andcommitted
Always use reflection to check class filename
But use the original line if the path was already correct.
1 parent 5238cde commit cce752a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Printer.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ function ($l) {
5151
$path = substr($error, 0, $lineIndex);
5252
$line = substr($error, $lineIndex + 1);
5353

54-
if (!$path) {
55-
list($path, $line) = $this->getReflectionFromTest(
56-
$defect->getTestName()
57-
);
54+
list($reflectedPath, $reflectedLine) = $this->getReflectionFromTest(
55+
$defect->getTestName()
56+
);
57+
58+
if($path !== $reflectedPath) {
59+
$path = $reflectedPath;
60+
$line = $reflectedLine;
5861
}
5962

6063
$message = explode("\n", $defect->getExceptionAsString());

0 commit comments

Comments
 (0)