MediaWiki REL1_33
LanguageSgsTest.php
Go to the documentation of this file.
1<?php
14 public function testPluralAllForms( $result, $value ) {
15 $forms = [ 'one', 'two', 'few', '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 providePluralAllForms() {
28 return [
29 [ 'few', 0 ],
30 [ 'one', 1 ],
31 [ 'two', 2 ],
32 [ 'other', 3 ],
33 [ 'few', 10 ],
34 [ 'few', 11 ],
35 [ 'few', 12 ],
36 [ 'few', 19 ],
37 [ 'other', 20 ],
38 [ 'few', 100 ],
39 [ 'one', 101 ],
40 [ 'few', 111 ],
41 [ 'few', 112 ],
42 ];
43 }
44
49 public function testPluralTwoForms( $result, $value ) {
50 $forms = [ 'one', 'other' ];
51 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
52 }
53
54 public static function providePluralTwoForms() {
55 return [
56 [ 'other', 0 ],
57 [ 'one', 1 ],
58 [ 'other', 2 ],
59 [ 'other', 3 ],
60 [ 'other', 10 ],
61 [ 'other', 11 ],
62 [ 'other', 12 ],
63 [ 'other', 19 ],
64 [ 'other', 20 ],
65 [ 'other', 100 ],
66 [ 'one', 101 ],
67 [ 'other', 111 ],
68 [ 'other', 112 ],
69 ];
70 }
71}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Helping class to run tests using a clean language instance.
Tests for Samogitian.
static providePluralAllForms()
testPluralTwoForms( $result, $value)
providePluralTwoForms Language::convertPlural
testPluralAllForms( $result, $value)
providePluralAllForms Language::convertPlural
static providePluralTwoForms()
testGetPluralRuleType( $result, $value)
providePluralAllForms Language::getPluralRuleType