@@ -69,6 +69,7 @@ protected function setUp()
69
69
* @param string $to
70
70
* @dataProvider arrayProvider
71
71
* @covers SebastianBergmann\Diff\Differ::diffToArray
72
+ * @covers SebastianBergmann\Diff\LCS\TimeEfficientImplementation
72
73
*/
73
74
public function testArrayRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsImplementation (array $ expected , $ from , $ to )
74
75
{
@@ -81,6 +82,7 @@ public function testArrayRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsI
81
82
* @param string $to
82
83
* @dataProvider textProvider
83
84
* @covers SebastianBergmann\Diff\Differ::diff
85
+ * @covers SebastianBergmann\Diff\LCS\TimeEfficientImplementation
84
86
*/
85
87
public function testTextRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsImplementation ($ expected , $ from , $ to )
86
88
{
@@ -93,6 +95,7 @@ public function testTextRepresentationOfDiffCanBeRenderedUsingTimeEfficientLcsIm
93
95
* @param string $to
94
96
* @dataProvider arrayProvider
95
97
* @covers SebastianBergmann\Diff\Differ::diffToArray
98
+ * @covers SebastianBergmann\Diff\LCS\MemoryEfficientImplementation
96
99
*/
97
100
public function testArrayRepresentationOfDiffCanBeRenderedUsingMemoryEfficientLcsImplementation (array $ expected , $ from , $ to )
98
101
{
@@ -105,12 +108,26 @@ public function testArrayRepresentationOfDiffCanBeRenderedUsingMemoryEfficientLc
105
108
* @param string $to
106
109
* @dataProvider textProvider
107
110
* @covers SebastianBergmann\Diff\Differ::diff
111
+ * @covers SebastianBergmann\Diff\LCS\MemoryEfficientImplementation
108
112
*/
109
113
public function testTextRepresentationOfDiffCanBeRenderedUsingMemoryEfficientLcsImplementation ($ expected , $ from , $ to )
110
114
{
111
115
$ this ->assertEquals ($ expected , $ this ->differ ->diff ($ from , $ to , new MemoryEfficientImplementation ));
112
116
}
113
117
118
+ /**
119
+ * @covers SebastianBergmann\Diff\Differ::diff
120
+ */
121
+ public function testCustomHeaderCanBeUsed ()
122
+ {
123
+ $ differ = new Differ ('CUSTOM HEADER ' );
124
+
125
+ $ this ->assertEquals (
126
+ "CUSTOM HEADER@@ @@ \n-a \n+b \n" ,
127
+ $ differ ->diff ('a ' , 'b ' )
128
+ );
129
+ }
130
+
114
131
public function arrayProvider ()
115
132
{
116
133
return array (
@@ -226,17 +243,4 @@ public function textProvider()
226
243
),
227
244
);
228
245
}
229
-
230
- /**
231
- * @covers SebastianBergmann\Diff\Differ::diff
232
- */
233
- public function testCustomHeaderCanBeUsed ()
234
- {
235
- $ differ = new Differ ('CUSTOM HEADER ' );
236
-
237
- $ this ->assertEquals (
238
- "CUSTOM HEADER@@ @@ \n-a \n+b \n" ,
239
- $ differ ->diff ('a ' , 'b ' )
240
- );
241
- }
242
246
}
0 commit comments