From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- tests/phpunit/languages/LanguageLvTest.php | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/phpunit/languages/LanguageLvTest.php (limited to 'tests/phpunit/languages/LanguageLvTest.php') diff --git a/tests/phpunit/languages/LanguageLvTest.php b/tests/phpunit/languages/LanguageLvTest.php new file mode 100644 index 00000000..0636da5f --- /dev/null +++ b/tests/phpunit/languages/LanguageLvTest.php @@ -0,0 +1,39 @@ +lang = Language::factory( 'lv' ); + } + function tearDown() { + unset( $this->lang ); + } + + /** @dataProvider providerPlural */ + function testPlural( $result, $value ) { + $forms = array( 'one', 'other' ); + $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); + } + + function providerPlural() { + return array ( + array( 'other', 0 ), #this must be zero form as per CLDR + array( 'one', 1 ), + array( 'other', 11 ), + array( 'one', 21 ), + array( 'other', 411 ), + array( 'other', 12.345 ), + array( 'other', 20 ), + array( 'one', 31 ), + array( 'other', 200 ), + ); + } + +} -- cgit v1.2.3-54-g00ecf