From: jenkins-bot Date: Wed, 23 Aug 2017 22:46:40 +0000 (+0000) Subject: Merge "Unit tests for CollationFa (0bfcbd724)" X-Git-Tag: 1.31.0-rc.0~2318 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=b95ca29602793f39191c06cd6941e3f32ab1bbb8;hp=f4fb49ca65bae507d9d49796d4ba3e2890bae82d;p=lhc%2Fweb%2Fwiklou.git Merge "Unit tests for CollationFa (0bfcbd724)" --- 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" ], + ]; + } +}