Skip to content

Commit b794e3d

Browse files
committed
Add: A test the DIFF_IGNORE_LINE_BLANK option
1 parent d21bdaf commit b794e3d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Diff/SimilarityTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ public function testGetSimilarity(): void
3131
$this->assertEquals(2 / 3, $similarity->getSimilarity(Similarity::CALC_FASTEST));
3232
}
3333

34+
/**
35+
* Test the DIFF_IGNORE_LINE_BLANK option
36+
*/
37+
public function testIgnoreLines(): void
38+
{
39+
$similarity = new Similarity('AAA', 'AAB', ['ignoreLines' => Similarity::DIFF_IGNORE_LINE_BLANK]);
40+
$this->assertEquals(2 / 3, $similarity->getSimilarity(Similarity::CALC_FAST));
41+
}
42+
3443
/**
3544
* Test the statistics function
3645
*/

0 commit comments

Comments
 (0)