MediaWiki REL1_31
LanguageCsTest.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', 3 ],
33 [ 'few', 4 ],
34 [ 'other', 5 ],
35 [ 'other', 11 ],
36 [ 'other', 20 ],
37 [ 'other', 25 ],
38 [ 'other', 200 ],
39 ];
40 }
41}
Helping class to run tests using a clean language instance.
Tests for MediaWiki languages/classes/Languagecs.php.
static providePlural()
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType