MediaWiki REL1_30
LanguageHyTest.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}
Helping class to run tests using a clean language instance.
Tests for Armenian (Հայերեն)
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
static providePlural()
testPlural( $result, $value)
providePlural Language::convertPlural