MediaWiki REL1_32
LanguageKshTest.php
Go to the documentation of this file.
1<?php
16 public function testPlural( $result, $value ) {
17 $forms = [ 'one', 'other', 'zero' ];
18 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 }
20
25 public function testGetPluralRuleType( $result, $value ) {
26 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 }
28
29 public static function providePlural() {
30 return [
31 [ 'zero', 0 ],
32 [ 'one', 1 ],
33 [ 'other', 2 ],
34 [ 'other', 200 ],
35 ];
36 }
37}
Helping class to run tests using a clean language instance.
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType