summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageLnTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageLnTest.php')
-rw-r--r--tests/phpunit/languages/LanguageLnTest.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/phpunit/languages/LanguageLnTest.php b/tests/phpunit/languages/LanguageLnTest.php
new file mode 100644
index 00000000..669d8b0a
--- /dev/null
+++ b/tests/phpunit/languages/LanguageLnTest.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * @author Santhosh Thottingal
+ * @copyright Copyright © 2012, Santhosh Thottingal
+ * @file
+ */
+
+/** Tests for MediaWiki languages/classes/LanguageLn.php */
+class LanguageLnTest 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 ),
+ );
+ }
+
+}