MediaWiki REL1_31
LanguageMkTest.php
Go to the documentation of this file.
1<?php
14 public function testPlural( $result, $value ) {
15 $forms = [ '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 [ 'other', 0 ],
30 [ 'one', 1 ],
31 [ 'one', 11 ],
32 [ 'one', 21 ],
33 [ 'one', 411 ],
34 [ 'other', 12.345 ],
35 [ 'other', 20 ],
36 [ 'one', 31 ],
37 [ 'other', 200 ],
38 ];
39 }
40}
Helping class to run tests using a clean language instance.
Tests for македонски/Macedonian.
static providePlural()
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
testPlural( $result, $value)
providePlural Language::convertPlural