MediaWiki REL1_31
LanguageWaTest.php
Go to the documentation of this file.
1<?php
16 public function testPlural( $result, $value ) {
17 $forms = [ 'one', 'other' ];
18 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 }
20
25 public function testGetPluralRuleType( $result, $value ) {
26 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 }
28
29 public static function providePlural() {
30 return [
31 [ 'one', 0 ],
32 [ 'one', 1 ],
33 [ 'other', 2 ],
34 ];
35 }
36}
Helping class to run tests using a clean language instance.
static providePlural()
testPlural( $result, $value)
providePlural Language::convertPlural
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType