LanguageBhoTest.php 828 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * @author Santhosh Thottingal
  4. * @copyright Copyright © 2012, Santhosh Thottingal
  5. * @file
  6. */
  7. /** Tests for MediaWiki languages/LanguageBho.php */
  8. class LanguageBhoTest extends LanguageClassesTestCase {
  9. /**
  10. * @dataProvider providePlural
  11. * @covers Language::convertPlural
  12. */
  13. public function testPlural( $result, $value ) {
  14. $forms = [ 'one', 'other' ];
  15. $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
  16. }
  17. /**
  18. * @dataProvider providePlural
  19. * @covers Language::getPluralRuleType
  20. */
  21. public function testGetPluralRuleType( $result, $value ) {
  22. $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
  23. }
  24. public static function providePlural() {
  25. return [
  26. [ 'one', 0 ],
  27. [ 'one', 1 ],
  28. [ 'other', 2 ],
  29. [ 'other', 200 ],
  30. ];
  31. }
  32. }