diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageBhTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageBhTest.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/phpunit/languages/LanguageBhTest.php b/tests/phpunit/languages/LanguageBhTest.php new file mode 100644 index 00000000..e1e2a13e --- /dev/null +++ b/tests/phpunit/languages/LanguageBhTest.php @@ -0,0 +1,34 @@ +<?php +/** + * @author Santhosh Thottingal + * @copyright Copyright © 2012, Santhosh Thottingal + * @file + */ + +/** Tests for MediaWiki languages/LanguageBh.php */ +class LanguageBhTest extends MediaWikiTestCase { + private $lang; + + function setUp() { + $this->lang = Language::factory( 'Bh' ); + } + function tearDown() { + unset( $this->lang ); + } + + /** @dataProvider providePlural */ + function testPlural( $result, $value ) { + $forms = array( 'one', 'other' ); + $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); + } + + function providePlural() { + return array ( + array( 'one', 0 ), + array( 'one', 1 ), + array( 'other', 2 ), + array( 'other', 200 ), + ); + } + +} |