MediaWiki REL1_30
LanguageHrTest.php
Go to the documentation of this file.
1<?php
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'few', 'other' ];
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
17 }
18
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
25 }
26
27 public static function providePlural() {
28 return [
29 [ 'other', 0 ],
30 [ 'one', 1 ],
31 [ 'few', 2 ],
32 [ 'few', 4 ],
33 [ 'other', 5 ],
34 [ 'other', 11 ],
35 [ 'other', 20 ],
36 [ 'one', 21 ],
37 [ 'few', 24 ],
38 [ 'other', 25 ],
39 [ 'other', 200 ],
40 ];
41 }
42}
Helping class to run tests using a clean language instance.
Tests for MediaWiki languages/classes/LanguageHr.php.
static providePlural()
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
testPlural( $result, $value)
providePlural Language::convertPlural