Skip to content

Commit 35623bb

Browse files
committed
OutputTest: fix risky test
The `OutputTest::testGitLabOutput()` was being marked as risky for the first test case (no errors) as no assertions were being run. This commit adds an extra assertion to prevent this, but also to make the test more thorough as the test will now also fail if the number of errors expected versus received does not match.
1 parent 7e2edd2 commit 35623bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: tests/Unit/Outputs/OutputTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public function testGitLabOutput($errors)
2626

2727
$result = (array) json_decode($writer->getLogs());
2828

29+
$this->assertSame(count($errors), count($result));
30+
2931
for ($i = 0; $i < count($result) && $i < count($errors); $i++) {
3032
$message = $errors[$i]->getMessage();
3133
$filePath = $errors[$i]->getFilePath();

0 commit comments

Comments
 (0)