MediaWiki REL1_32
LanguageBeTest.php
Go to the documentation of this file.
1<?php
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'few', 'many', '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 [ 'one', 1 ],
30 [ 'many', 11 ],
31 [ 'one', 91 ],
32 [ 'one', 121 ],
33 [ 'few', 2 ],
34 [ 'few', 3 ],
35 [ 'few', 4 ],
36 [ 'few', 334 ],
37 [ 'many', 5 ],
38 [ 'many', 15 ],
39 [ 'many', 120 ],
40 ];
41 }
42}
Tests for MediaWiki languages/LanguageBe.php.
static providePlural()
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
Helping class to run tests using a clean language instance.