Merge "[FileBackend] Tweaked TempFSFile::bind() to handle __get()."
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageHsbTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageHsb.php */
9 class LanguageHsbTest extends MediaWikiTestCase {
10 private $lang;
11
12 protected function setUp() {
13 $this->lang = Language::factory( 'hsb' );
14 }
15 protected function tearDown() {
16 unset( $this->lang );
17 }
18
19 /** @dataProvider providePlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'one', 'two', 'few', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
23 }
24
25 function providePlural() {
26 return array (
27 array( 'other', 0 ),
28 array( 'one', 1 ),
29 array( 'one', 101 ),
30 array( 'one', 90001 ),
31 array( 'two', 2 ),
32 array( 'few', 3 ),
33 array( 'few', 203 ),
34 array( 'few', 4 ),
35 array( 'other', 99 ),
36 array( 'other', 555 ),
37 );
38 }
39
40 }