6de88e596e2a46a2bb67d25a58eab147c2eef0d4
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
8 /** Tests for MediaWiki languages/classes/LanguageHe.php */
9 class LanguageHeTest
extends LanguageClassesTestCase
{
11 /** @dataProvider providerPluralDual */
12 function testPluralDual( $result, $value ) {
13 $forms = array( 'one', 'two', 'other' );
14 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
17 function providerPluralDual() {
19 array( 'other', 0 ), // Zero -> plural
20 array( 'one', 1 ), // Singular
21 array( 'two', 2 ), // Dual
22 array( 'other', 3 ), // Plural
26 /** @dataProvider providerPlural */
27 function testPlural( $result, $value ) {
28 $forms = array( 'one', 'other' );
29 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
32 function providerPlural() {
34 array( 'other', 0 ), // Zero -> plural
35 array( 'one', 1 ), // Singular
36 array( 'other', 2 ), // Plural, no dual provided
37 array( 'other', 3 ), // Plural
41 /** @dataProvider providerGrammar */
42 function testGrammar( $result, $word, $case ) {
43 $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
46 // The comments in the beginning of the line help avoid RTL problems
48 function providerGrammar() {
51 /* result */ 'וויקיפדיה',
52 /* word */ 'ויקיפדיה',
56 /* result */ 'וולפגנג',
58 /* case */ 'prefixed',
66 /* result */ '־Wikipedia',
67 /* word */ 'Wikipedia',