summaryrefslogtreecommitdiff
path: root/www/wiki/tests/phpunit/languages/classes/LanguageIuTest.php
blob: 01d97fc0c4112dd443a00be05c5d7a0e068243d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

/**
 * @covers LanguageIu
 * @covers IuConverter
 */
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 [
			// ike-cans
			[
				[
					'ike-cans' => 'ᐴ',
					'ike-latn' => 'PUU',
					'iu' => 'PUU',
				],
				'PUU'
			],
			// ike-latn
			[
				[
					'ike-cans' => 'ᐴ',
					'ike-latn' => 'puu',
					'iu' => 'ᐴ',
				],
				'ᐴ'
			],
		];
	}
}