File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
tests/PHPStan/Command/ErrorFormatter Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments