(bug 37755) Set robot meta tags for 'view source' pages
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageMgTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageMg.php */
9 class LanguageMgTest extends MediaWikiTestCase {
10 private $lang;
11
12 protected function setUp() {
13 $this->lang = Language::factory( 'mg' );
14 }
15 protected function tearDown() {
16 unset( $this->lang );
17 }
18
19 /** @dataProvider providePlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'one', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
23 }
24
25 function providePlural() {
26 return array (
27 array( 'one', 0 ),
28 array( 'one', 1 ),
29 array( 'other', 2 ),
30 array( 'other', 200 ),
31 array( 'other', 123.3434 ),
32 );
33 }
34
35 }