Index: trunk/phase3/tests/phpunit/languages/LanguageHeTest.php |
— | — | @@ -0,0 +1,33 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * @author Amir E. Aharoni |
| 5 | + * @copyright Copyright © 2012, Amir E. Aharoni |
| 6 | + * @file |
| 7 | + */ |
| 8 | + |
| 9 | +/** Tests for MediaWiki languages/classes/LanguageHe.php */ |
| 10 | +class LanguageHeTest extends MediaWikiTestCase { |
| 11 | + private $lang; |
| 12 | + |
| 13 | + function setUp() { |
| 14 | + $this->lang = Language::factory( 'he' ); |
| 15 | + } |
| 16 | + function tearDown() { |
| 17 | + unset( $this->lang ); |
| 18 | + } |
| 19 | + |
| 20 | + /** @dataProvider providerPlural */ |
| 21 | + function testPlural( $result, $value ) { |
| 22 | + $forms = array( 'one', 'many', 'two' ); |
| 23 | + $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); |
| 24 | + } |
| 25 | + |
| 26 | + function providerPlural() { |
| 27 | + return array ( |
| 28 | + array( 'many', 0 ), // Zero |
| 29 | + array( 'one', 1 ), // Singular |
| 30 | + array( 'two', 2 ), // Dual |
| 31 | + array( 'many', 3 ), // Plural |
| 32 | + ); |
| 33 | + } |
| 34 | +} |
Property changes on: trunk/phase3/tests/phpunit/languages/LanguageHeTest.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 35 | + native |