MediaWiki REL1_31
LanguageLvTest.php
Go to the documentation of this file.
1<?php
14 public function testPlural( $result, $value ) {
15 $forms = [ 'zero', 'one', '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 [ 'zero', 0 ],
30 [ 'one', 1 ],
31 [ 'zero', 11 ],
32 [ 'one', 21 ],
33 [ 'zero', 411 ],
34 [ 'other', 2 ],
35 [ 'other', 9 ],
36 [ 'zero', 12 ],
37 [ 'other', 12.345 ],
38 [ 'zero', 20 ],
39 [ 'other', 22 ],
40 [ 'one', 31 ],
41 [ 'zero', 200 ],
42 ];
43 }
44}
Helping class to run tests using a clean language instance.
Tests for Latvian.
testPlural( $result, $value)
providePlural Language::convertPlural
static providePlural()
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType