Skip to content

Commit 153e051

Browse files
committed
Some additional tests
1 parent 8dfa6ad commit 153e051

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/PHPStan/Command/ErrorFormatter/BaselineNeonErrorFormatterTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,24 @@ public function endOfFileNewlinesProvider(): Generator
363363
'existingBaselineContent' => '',
364364
'expectedNewlinesCount' => 1,
365365
];
366+
367+
yield 'empty existing baseline, no new errors' => [
368+
'errors' => [],
369+
'existingBaselineContent' => '',
370+
'expectedNewlinesCount' => 1,
371+
];
372+
373+
yield 'empty existing baseline with a newline, no new errors' => [
374+
'errors' => [],
375+
'existingBaselineContent' => "\n",
376+
'expectedNewlinesCount' => 1,
377+
];
378+
379+
yield 'empty existing baseline with 2 newlines, no new errors' => [
380+
'errors' => [],
381+
'existingBaselineContent' => "\n\n",
382+
'expectedNewlinesCount' => 2,
383+
];
366384
}
367385

368386
/**

0 commit comments

Comments
 (0)