wiki.techinc.nl/tests/phpunit/languages/LanguageBhoTest.php
Niklas Laxström 04bf35d331 Eliminate dummy Language instances from being created
By checking the code against $wgDummyLanguageCodes we can
get rid of checking it on a case-by-case basis.

It's only a suggestion (I don't know if it can break anything),
and Amir Aharoni said that big changes are coming (Bug 41103).

In private case, this change fixes Bug 27571 and maybe some other
language fallback related issues.

Change-Id: I5212beabd5cc212b50ee98b5b53ec01b20ffd0c3
2013-01-02 17:42:22 +00:00

26 lines
572 B
PHP

<?php
/**
* @author Santhosh Thottingal
* @copyright Copyright © 2012, Santhosh Thottingal
* @file
*/
/** Tests for MediaWiki languages/LanguageBho.php */
class LanguageBhoTest extends LanguageClassesTestCase {
/** @dataProvider providePlural */
function testPlural( $result, $value ) {
$forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
function providePlural() {
return array (
array( 'one', 0 ),
array( 'one', 1 ),
array( 'other', 2 ),
array( 'other', 200 ),
);
}
}