LanguageWaTest.php 775 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * @author Amir E. Aharoni
  4. * @copyright Copyright © 2012, Amir E. Aharoni
  5. * @file
  6. */
  7. /**
  8. * @covers LanguageWa
  9. */
  10. class LanguageWaTest 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. [ 'one', 0 ],
  29. [ 'one', 1 ],
  30. [ 'other', 2 ],
  31. ];
  32. }
  33. }