MediaWiki REL1_31
LanguageBsTest.php
Go to the documentation of this file.
1<?php
18 public function testPlural( $result, $value ) {
19 $forms = [ 'one', 'few', 'other' ];
20 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
21 }
22
27 public function testGetPluralRuleType( $result, $value ) {
28 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
29 }
30
31 public static function providePlural() {
32 return [
33 [ 'other', 0 ],
34 [ 'one', 1 ],
35 [ 'few', 2 ],
36 [ 'few', 4 ],
37 [ 'other', 5 ],
38 [ 'other', 11 ],
39 [ 'other', 20 ],
40 [ 'one', 21 ],
41 [ 'few', 24 ],
42 [ 'other', 25 ],
43 [ 'other', 200 ],
44 ];
45 }
46}
Tests for Croatian (hrvatski)
static providePlural()
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
Helping class to run tests using a clean language instance.