summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageHsbTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-09-04 05:51:59 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-09-04 05:51:59 +0200
commit91e194556c52d2f354344f930419eef2dd6267f0 (patch)
tree0cd12490d3cd3499274017c9b799d0f738d3719e /tests/phpunit/languages/LanguageHsbTest.php
parent08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (diff)
Update to MediaWiki 1.21.2
Diffstat (limited to 'tests/phpunit/languages/LanguageHsbTest.php')
-rw-r--r--tests/phpunit/languages/LanguageHsbTest.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/phpunit/languages/LanguageHsbTest.php b/tests/phpunit/languages/LanguageHsbTest.php
new file mode 100644
index 00000000..bec7d819
--- /dev/null
+++ b/tests/phpunit/languages/LanguageHsbTest.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * @author Santhosh Thottingal
+ * @copyright Copyright © 2012, Santhosh Thottingal
+ * @file
+ */
+
+/** Tests for MediaWiki languages/classes/LanguageHsb.php */
+class LanguageHsbTest extends LanguageClassesTestCase {
+
+ /** @dataProvider providePlural */
+ function testPlural( $result, $value ) {
+ $forms = array( 'one', 'two', 'few', 'other' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
+ }
+
+ function providePlural() {
+ return array(
+ array( 'other', 0 ),
+ array( 'one', 1 ),
+ array( 'one', 101 ),
+ array( 'one', 90001 ),
+ array( 'two', 2 ),
+ array( 'few', 3 ),
+ array( 'few', 203 ),
+ array( 'few', 4 ),
+ array( 'other', 99 ),
+ array( 'other', 555 ),
+ );
+ }
+
+}