Skip to content

Commit

Permalink
Fixed float comparision
Browse files Browse the repository at this point in the history
  • Loading branch information
antalaron committed Sep 20, 2017
1 parent a42fff5 commit 741cdf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/MbSimilarTextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MbSimilarTextTest extends \PHPUnit_Framework_TestCase
public function testMbSimilarTextIsSameAsSimilarText($str1, $str2)
{
$this->assertSame(similar_text($str1, $str2, $percent1), mb_similar_text($str1, $str2, $percent2));
$this->assertSame($percent1, $percent2);
$this->assertSame($percent1, $percent2, '', 0.01);
}

/**
Expand All @@ -33,7 +33,7 @@ public function testMbSimilarTextIsSameAsSimilarText($str1, $str2)
public function testMbSimilarTextWithValues($str1, $str2, $similarity, $percent)
{
$this->assertSame($similarity, mb_similar_text($str1, $str2, $gotPercent));
$this->assertSame($percent, $gotPercent);
$this->assertSame($percent, $gotPercent, '', 0.01);
}

public function plainValues()
Expand Down

0 comments on commit 741cdf9

Please sign in to comment.