Index: trunk/phase3/tests/phpunit/languages/LanguageHeTest.php |
— | — | @@ -16,17 +16,32 @@ |
17 | 17 | unset( $this->lang ); |
18 | 18 | } |
19 | 19 | |
| 20 | + /** @dataProvider providerPluralDual */ |
| 21 | + function testPluralDual( $result, $value ) { |
| 22 | + $forms = array( 'one', 'many', 'two' ); |
| 23 | + $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); |
| 24 | + } |
| 25 | + |
| 26 | + function providerPluralDual() { |
| 27 | + return array ( |
| 28 | + array( 'many', 0 ), // Zero -> plural |
| 29 | + array( 'one', 1 ), // Singular |
| 30 | + array( 'two', 2 ), // Dual |
| 31 | + array( 'many', 3 ), // Plural |
| 32 | + ); |
| 33 | + } |
| 34 | + |
20 | 35 | /** @dataProvider providerPlural */ |
21 | 36 | function testPlural( $result, $value ) { |
22 | | - $forms = array( 'one', 'many', 'two' ); |
| 37 | + $forms = array( 'one', 'many' ); |
23 | 38 | $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); |
24 | 39 | } |
25 | 40 | |
26 | 41 | function providerPlural() { |
27 | 42 | return array ( |
28 | | - array( 'many', 0 ), // Zero |
| 43 | + array( 'many', 0 ), // Zero -> plural |
29 | 44 | array( 'one', 1 ), // Singular |
30 | | - array( 'two', 2 ), // Dual |
| 45 | + array( 'many', 2 ), // Plural, no dual provided |
31 | 46 | array( 'many', 3 ), // Plural |
32 | 47 | ); |
33 | 48 | } |