LanguageMkTest.php 923 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @author Santhosh Thottingal
  4. * @copyright Copyright © 2012, Santhosh Thottingal
  5. * @file
  6. */
  7. /** Tests for македонски/Macedonian */
  8. class LanguageMkTest 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. [ 'other', 0 ],
  27. [ 'one', 1 ],
  28. [ 'one', 11 ],
  29. [ 'one', 21 ],
  30. [ 'one', 411 ],
  31. [ 'other', 12.345 ],
  32. [ 'other', 20 ],
  33. [ 'one', 31 ],
  34. [ 'other', 200 ],
  35. ];
  36. }
  37. }