diff options
Diffstat (limited to 'www/wiki/tests/phpunit/languages/classes/LanguageMkTest.php')
-rw-r--r-- | www/wiki/tests/phpunit/languages/classes/LanguageMkTest.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/www/wiki/tests/phpunit/languages/classes/LanguageMkTest.php b/www/wiki/tests/phpunit/languages/classes/LanguageMkTest.php new file mode 100644 index 00000000..6469a063 --- /dev/null +++ b/www/wiki/tests/phpunit/languages/classes/LanguageMkTest.php @@ -0,0 +1,40 @@ +<?php +/** + * @author Santhosh Thottingal + * @copyright Copyright © 2012, Santhosh Thottingal + * @file + */ + +/** Tests for македонски/Macedonian */ +class LanguageMkTest extends LanguageClassesTestCase { + /** + * @dataProvider providePlural + * @covers Language::convertPlural + */ + public function testPlural( $result, $value ) { + $forms = [ 'one', 'other' ]; + $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); + } + + /** + * @dataProvider providePlural + * @covers Language::getPluralRuleType + */ + public function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); + } + + public static function providePlural() { + return [ + [ 'other', 0 ], + [ 'one', 1 ], + [ 'one', 11 ], + [ 'one', 21 ], + [ 'one', 411 ], + [ 'other', 12.345 ], + [ 'other', 20 ], + [ 'one', 31 ], + [ 'other', 200 ], + ]; + } +} |