gplx/mediawiki/tests/phpunit/includes/language/converters/TgConverterTest.php

36 lines
624 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @group Language
* @covers \TgConverter
*/
class TgConverterTest extends MediaWikiIntegrationTestCase {
use LanguageConverterTestTrait;
/**
* @dataProvider provideAutoConvertToAllVariants
*/
public function testAutoConvertToAllVariants( $result, $value ) {
$this->assertEquals( $result, $this->getLanguageConverter()->autoConvertToAllVariants( $value ) );
}
public static function provideAutoConvertToAllVariants() {
return [
[
[
'tg' => 'г',
'tg-latn' => 'g',
],
'г'
],
[
[
'tg' => 'g',
'tg-latn' => 'g',
],
'g'
],
];
}
}