MediaWiki REL1_32
LanguageSkTest.php
Go to the documentation of this file.
1<?php
15 public function testPlural( $result, $value ) {
16 $forms = [ 'one', 'few', 'other' ];
17 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
18 }
19
24 public function testGetPluralRuleType( $result, $value ) {
25 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
26 }
27
28 public static function providePlural() {
29 return [
30 [ 'other', 0 ],
31 [ 'one', 1 ],
32 [ 'few', 2 ],
33 [ 'few', 3 ],
34 [ 'few', 4 ],
35 [ 'other', 5 ],
36 [ 'other', 11 ],
37 [ 'other', 20 ],
38 [ 'other', 25 ],
39 [ 'other', 200 ],
40 ];
41 }
42}
Helping class to run tests using a clean language instance.
Tests for MediaWiki languages/classes/LanguageSk.php.
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
static providePlural()