LanguageHuTest.php 806 B

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