Skip to content

Commit 290c796

Browse files
rajyanondrejmirtes
authored andcommitted
add filename and line of the error of assertVariableCertainty
1 parent e870778 commit 290c796

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Testing/TypeInferenceTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function assertFileAsserts(
101101
$variableName = $args[2];
102102
$this->assertTrue(
103103
$expectedCertainty->equals($actualCertainty),
104-
sprintf('Expected %s, actual certainty of variable $%s is %s', $expectedCertainty->describe(), $variableName, $actualCertainty->describe()),
104+
sprintf('Expected %s, actual certainty of variable $%s is %s in %s on line %d.', $expectedCertainty->describe(), $variableName, $actualCertainty->describe(), $file, $args[3]),
105105
);
106106
}
107107
}
@@ -161,7 +161,7 @@ public function gatherAssertTypes(string $file): array
161161
}
162162

163163
$actualCertaintyValue = $scope->hasVariableType($variable->name);
164-
$assert = ['variableCertainty', $file, $expectedertaintyValue, $actualCertaintyValue, $variable->name];
164+
$assert = ['variableCertainty', $file, $expectedertaintyValue, $actualCertaintyValue, $variable->name, $node->getLine()];
165165
} else {
166166
return;
167167
}

0 commit comments

Comments
 (0)