wiki.techinc.nl/tests/phpunit/languages/classes/LanguageIuTest.php
Tim Starling f0ba7a69a1 Add tests for LanguageConverter classes that didn't have them
Some of them don't have many test cases, or have test cases that don't
represent the ideal transliteration and so are subject to change. But
this is better than nothing.

Change-Id: I4aae693bd77d9ff365f48113923ed7f9fed8d668
2016-02-08 09:19:25 +11:00

34 lines
676 B
PHP

<?php
class LanguageIuTest extends LanguageClassesTestCase {
/**
* @dataProvider provideAutoConvertToAllVariants
* @covers Language::autoConvertToAllVariants
*/
public function testAutoConvertToAllVariants( $result, $value ) {
$this->assertEquals( $result, $this->getLang()->autoConvertToAllVariants( $value ) );
}
public static function provideAutoConvertToAllVariants() {
return array(
// ike-cans
array(
array(
'ike-cans' => 'ᐴ',
'ike-latn' => 'PUU',
'iu' => 'PUU',
),
'PUU'
),
// ike-latn
array(
array(
'ike-cans' => 'ᐴ',
'ike-latn' => 'puu',
'iu' => 'ᐴ',
),
'ᐴ'
),
);
}
}