From 74ab36a5fda4e12776504a8687d4ca62a977603a Mon Sep 17 00:00:00 2001 From: Simon Dann Date: Thu, 17 Feb 2022 22:01:42 +0000 Subject: [PATCH] test: adds breaking test for #9 --- tests/ConfusableTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/ConfusableTest.php b/tests/ConfusableTest.php index c785f72..ff5368b 100644 --- a/tests/ConfusableTest.php +++ b/tests/ConfusableTest.php @@ -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'])); + } } \ No newline at end of file