Localisation updates from http://translatewiki.net.
[mediawiki.git] / tests / phpunit / languages / LanguageMoTest.php
blob533e590fab89161cd5694900c063888503fc7a0e
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
8 /** Tests for MediaWiki languages/classes/LanguageMo.php */
9 class LanguageMoTest extends MediaWikiTestCase {
10 private $lang;
12 function setUp() {
13 $this->lang = Language::factory( 'mo' );
15 function tearDown() {
16 unset( $this->lang );
19 /** @dataProvider providerPlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'one', 'few', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
25 function providerPlural() {
26 return array (
27 array( 'few', 0 ),
28 array( 'one', 1 ),
29 array( 'few', 2 ),
30 array( 'few', 19 ),
31 array( 'other', 20 ),
32 array( 'other', 99 ),
33 array( 'other', 100 ),
34 array( 'few', 101 ),
35 array( 'few', 119 ),
36 array( 'other', 120 ),
37 array( 'other', 200 ),
38 array( 'few', 201 ),
39 array( 'few', 219 ),
40 array( 'other', 220 ),