Skip to content

Commit a28efcc

Browse files
jrfnlgrogy
authored andcommitted
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 b9df728 commit a28efcc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/Output.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class OutputTest extends Tester\TestCase
3131

3232
$result = (array) json_decode($writer->getLogs());
3333

34+
Assert::equal(count($errors), count($result));
35+
3436
for ($i = 0; $i < count($result) && $i < count($errors); $i++) {
3537
$message = $errors[$i]->getMessage();
3638
$filePath = $errors[$i]->getFilePath();

0 commit comments

Comments
 (0)