From: Brian Wolff Date: Mon, 29 May 2017 16:22:33 +0000 (+0000) Subject: Unit tests for CollationFa (0bfcbd724) X-Git-Tag: 1.31.0-rc.0~2318^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=d16c26fd2cbc190e078314f25889dd872269b160 Unit tests for CollationFa (0bfcbd724) Change-Id: I8286244cc1a61f34a3599c4f2e6201ba91c5e79a --- diff --git a/tests/phpunit/includes/collation/CollationFaTest.php b/tests/phpunit/includes/collation/CollationFaTest.php new file mode 100644 index 0000000000..f230197a67 --- /dev/null +++ b/tests/phpunit/includes/collation/CollationFaTest.php @@ -0,0 +1,46 @@ +assertEquals( $letter, $coll->getFirstLetter( $str ), $str ); + } + + public function provideGetFirstLetter() { + return [ + [ + '۷', + '۷' + ], + [ + 'ا', + 'ا' + ], + [ + 'ا', + 'ایران' + ], + [ + 'ب', + 'برلین' + ], + [ + 'و', + 'واو' + ], + [ "\xd8\xa7", "\xd8\xa7Foo" ], + [ "\xd9\x88", "\xd9\x88Foo" ], + [ "\xd9\xb2", "\xd9\xb2Foo" ], + [ "\xd9\xb3", "\xd9\xb3Foo" ], + ]; + } +}