LanguageGanTest.php 707 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @covers LanguageGan
  4. * @covers GanConverter
  5. */
  6. class LanguageGanTest extends LanguageClassesTestCase {
  7. /**
  8. * @dataProvider provideAutoConvertToAllVariants
  9. * @covers Language::autoConvertToAllVariants
  10. */
  11. public function testAutoConvertToAllVariants( $result, $value ) {
  12. $this->assertEquals( $result, $this->getLang()->autoConvertToAllVariants( $value ) );
  13. }
  14. public static function provideAutoConvertToAllVariants() {
  15. return [
  16. // zh2Hans
  17. [
  18. [
  19. 'gan' => '㑯',
  20. 'gan-hans' => '㑔',
  21. 'gan-hant' => '㑯',
  22. ],
  23. '㑯'
  24. ],
  25. // zh2Hant
  26. [
  27. [
  28. 'gan' => '㐷',
  29. 'gan-hans' => '㐷',
  30. 'gan-hant' => '傌',
  31. ],
  32. '㐷'
  33. ],
  34. ];
  35. }
  36. }