wiki.techinc.nl/tests/phpunit/languages/LanguageTlTest.php
Santhosh Thottingal 8dc3631093 Update plural data to CLDR 26
* The updates include incompatible changes for plural forms in Russian,
  Prussian, Tagalog, Manx and several languages that fall back to Russian.
  In addition there are minor changes for other languages.
* Test cases were updated to reflect these changes.

Bug: 62861
Change-Id: I7cce477925330fe5bbf51a8470060dc1223981d0
2014-10-27 08:30:34 +00:00

36 lines
876 B
PHP

<?php
/**
* @author Amir E. Aharoni
* @copyright Copyright © 2012, Amir E. Aharoni
* @file
*/
/** Tests for MediaWiki languages/classes/LanguageTl.php */
class LanguageTlTest extends LanguageClassesTestCase {
/**
* @dataProvider providePlural
* @covers Language::convertPlural
*/
public function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
/**
* @dataProvider providePlural
* @covers Language::getPluralRuleType
*/
public function testGetPluralRuleType( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
public static function providePlural() {
return array(
array( 'one', 0 ),
array( 'one', 1 ),
array( 'one', 2 ),
array( 'other', 4 ),
array( 'other', 6 ),
);
}
}