@@ -18,24 +18,16 @@ final class IgnoreLineEndingTest extends TestCase
1818 /**
1919 * @return string[][]
2020 */
21- public function provideIgnoreLineEndingTrue (): array
21+ public function provideIgnoreLineEnding (): array
2222 {
2323 return [
2424 [
2525 file_get_contents (__DIR__ . '/data/ignore_line_ending/old_1.txt ' ),
2626 file_get_contents (__DIR__ . '/data/ignore_line_ending/new_1.txt ' ),
2727 <<<'DIFF'
2828DIFF,
29+ true ,
2930 ],
30- ];
31- }
32-
33- /**
34- * @return string[][]
35- */
36- public function provideIgnoreLineEndingFalse (): array
37- {
38- return [
3931 [
4032 file_get_contents (__DIR__ . '/data/ignore_line_ending/old_1.txt ' ),
4133 file_get_contents (__DIR__ . '/data/ignore_line_ending/new_1.txt ' ),
@@ -47,31 +39,22 @@ public function provideIgnoreLineEndingFalse(): array
4739+line 2
4840
4941DIFF ,
42+ false ,
5043 ],
5144 ];
5245 }
5346
5447 /**
55- * @dataProvider provideIgnoreLineEndingTrue
56- */
57- public function testIgnoreLineEndingTrue (string $ old , string $ new , string $ expectedDiff ): void
58- {
59- $ diff = DiffHelper::calculate ($ old , $ new , 'Unified ' , [
60- 'ignoreLineEnding ' => true ,
61- ], [
62- 'cliColorization ' => RendererConstant::CLI_COLOR_DISABLE ,
63- ]);
64-
65- static ::assertSame ($ expectedDiff , $ diff );
66- }
67-
68- /**
69- * @dataProvider provideIgnoreLineEndingFalse
48+ * @dataProvider provideIgnoreLineEnding
7049 */
71- public function testIgnoreLineEndingFalse (string $ old , string $ new , string $ expectedDiff ): void
72- {
50+ public function testIgnoreLineEnding (
51+ string $ old ,
52+ string $ new ,
53+ string $ expectedDiff ,
54+ bool $ gnoreLineEnding
55+ ): void {
7356 $ diff = DiffHelper::calculate ($ old , $ new , 'Unified ' , [
74- 'ignoreLineEnding ' => false ,
57+ 'ignoreLineEnding ' => $ gnoreLineEnding ,
7558 ], [
7659 'cliColorization ' => RendererConstant::CLI_COLOR_DISABLE ,
7760 ]);
0 commit comments