Skip to content

Commit

Permalink
test: adds breaking test for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
carbontwelve committed Feb 17, 2022
1 parent f6d4a97 commit 74ab36a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/ConfusableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,19 @@ public function testIsDangerous()
$this->assertFalse($confusables->isDangerous(' ρτ.τ'));
$this->assertFalse($confusables->isDangerous('ρτ.τ'));
}

/**
* Test written to investigate report of missing confusables by Michael Butler
* @see https://github.com/photogabble/php-confusable-homoglyphs/issues/9
* @see https://util.unicode.org/UnicodeJsps/confusables.jsp?a=w&r=None
*/
public function testJsonFileIssue9()
{
$all = file_get_contents(__DIR__ . '/../src/confusables.json');
$all = json_decode($all, true);
$this->assertGreaterThanOrEqual(23, count($all['a']));
$this->assertGreaterThanOrEqual(22, count($all['w']));
$this->assertGreaterThanOrEqual(20, count($all['w']));
$this->assertGreaterThanOrEqual(18, count($all['m']));
}
}

0 comments on commit 74ab36a

Please sign in to comment.