Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git] / tests / phpunit / includes / collation / CollationFaTest.php
1 <?php
2 class CollationFaTest extends MediaWikiTestCase {
3
4 /*
5 * The ordering is a weird hack designed to work only with a very
6 * specific version of libicu, and as such can't really be unit tested
7 * against a random version of libicu
8 */
9
10 /**
11 * @dataProvider provideGetFirstLetter
12 */
13 public function testGetFirstLetter( $letter, $str ) {
14 $coll = new CollationFa;
15 $this->assertEquals( $letter, $coll->getFirstLetter( $str ), $str );
16 }
17
18 public function provideGetFirstLetter() {
19 return [
20 [
21 '۷',
22 '۷'
23 ],
24 [
25 'ا',
26 'ا'
27 ],
28 [
29 'ا',
30 'ایران'
31 ],
32 [
33 'ب',
34 'برلین'
35 ],
36 [
37 'و',
38 'واو'
39 ],
40 [ "\xd8\xa7", "\xd8\xa7Foo" ],
41 [ "\xd9\x88", "\xd9\x88Foo" ],
42 [ "\xd9\xb2", "\xd9\xb2Foo" ],
43 [ "\xd9\xb3", "\xd9\xb3Foo" ],
44 ];
45 }
46 }