MediaWiki REL1_32
LanguageShTest.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', 10 ],
35 [ 'other', 11 ],
36 [ 'other', 12 ],
37 [ 'one', 101 ],
38 [ 'few', 102 ],
39 [ 'other', 111 ],
40 ];
41 }
42}
Helping class to run tests using a clean language instance.
Tests for srpskohrvatski / српскохрватски / Serbocroatian.
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
testPlural( $result, $value)
providePlural Language::convertPlural
static providePlural()