summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageHrTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageHrTest.php')
-rw-r--r--tests/phpunit/languages/LanguageHrTest.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/phpunit/languages/LanguageHrTest.php b/tests/phpunit/languages/LanguageHrTest.php
new file mode 100644
index 00000000..9dce4ea7
--- /dev/null
+++ b/tests/phpunit/languages/LanguageHrTest.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * @author Santhosh Thottingal
+ * @copyright Copyright © 2012, Santhosh Thottingal
+ * @file
+ */
+
+/** Tests for MediaWiki languages/classes/LanguageHr.php */
+class LanguageHrTest extends LanguageClassesTestCase {
+
+ /** @dataProvider providerPlural */
+ function testPlural( $result, $value ) {
+ $forms = array( 'one', 'few', 'many', 'other' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
+ }
+
+ function providerPlural() {
+ return array(
+ array( 'many', 0 ),
+ array( 'one', 1 ),
+ array( 'few', 2 ),
+ array( 'few', 4 ),
+ array( 'many', 5 ),
+ array( 'many', 11 ),
+ array( 'many', 20 ),
+ array( 'one', 21 ),
+ array( 'few', 24 ),
+ array( 'many', 25 ),
+ array( 'many', 200 ),
+ );
+ }
+
+}