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