MediaWiki REL1_31
LanguageHyTest.php
Go to the documentation of this file.
1<?php
18 public function testPlural( $result, $value ) {
19 $forms = [ 'one', 'other' ];
20 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
21 }
22
27 public function testGetPluralRuleType( $result, $value ) {
28 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
29 }
30
31 public static function providePlural() {
32 return [
33 [ 'one', 0 ],
34 [ 'one', 1 ],
35 [ 'other', 2 ],
36 [ 'other', 200 ],
37 ];
38 }
39}
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