Merge "Update docs/hooks.txt for ShowSearchHitTitle"
[mediawiki.git] / tests / phpunit / languages / classes / LanguageShTest.php
blob2a669178ca4cd5a35811666dbe93c6c3ed2c63c6
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
8 /** Tests for srpskohrvatski / српскохрватски / Serbocroatian */
9 class LanguageShTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'few', 'other' ];
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 /**
20 * @dataProvider providePlural
21 * @covers Language::getPluralRuleType
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 public static function providePlural() {
28 return [
29 [ 'other', 0 ],
30 [ 'one', 1 ],
31 [ 'few', 2 ],
32 [ 'few', 4 ],
33 [ 'other', 5 ],
34 [ 'other', 10 ],
35 [ 'other', 11 ],
36 [ 'other', 12 ],
37 [ 'one', 101 ],
38 [ 'few', 102 ],
39 [ 'other', 111 ],