MediaWiki REL1_32
LanguageAmTest.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 [ 'one', 0 ],
30 [ 'one', 1 ],
31 [ 'other', 2 ],
32 [ 'other', 200 ],
33 ];
34 }
35}
Tests for MediaWiki languages/LanguageAm.php.
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
testPlural( $result, $value)
providePlural Language::convertPlural
static providePlural()
Helping class to run tests using a clean language instance.