phpunit testcases on the plural rules for am, ar, be, be_tarask, bh, bs and hi languages
[mediawiki.git] / tests / phpunit / languages / LanguageAmTest.php
blob3a648ded5bc8586b110f8371393cce225c1c4f0d
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
8 /** Tests for MediaWiki languages/LanguageAm.php */
9 class LanguageAmTest extends MediaWikiTestCase {
10 private $lang;
12 function setUp() {
13 $this->lang = Language::factory( 'Am' );
15 function tearDown() {
16 unset( $this->lang );
19 /** @dataProvider providePlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'one', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
25 function providePlural() {
26 return array (
27 array( 'one', 0 ),
28 array( 'one', 1 ),
29 array( 'other', 2 ),
30 array( 'other', 200 ),