wiki.techinc.nl/tests/phpunit/languages/classes/LanguageKuTest.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

40 lines
1.3 KiB
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
class LanguageKuTest 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(
array(
array(
'ku' => '١',
'ku-arab' => '١',
'ku-latn' => '1',
),
'١'
),
array(
array(
'ku' => 'Wîkîpediya ensîklopediyeke azad bi rengê wîkî ye.',
'ku-arab' => 'ویکیپەدیائە نسیکلۆپەدیەکەئا زاد ب رەنگێ ویکی یە.',
'ku-latn' => 'Wîkîpediya ensîklopediyeke azad bi rengê wîkî ye.',
),
'Wîkîpediya ensîklopediyeke azad bi rengê wîkî ye.'
),
array(
array(
'ku' => 'ویکیپەدیا ەنسیکلۆپەدیەکەئا زاد ب رەنگێ ویکی یە.',
'ku-arab' => 'ویکیپەدیا ەنسیکلۆپەدیەکەئا زاد ب رەنگێ ویکی یە.',
'ku-latn' => 'wîkîpedîa ensîklopedîekea zad b rengê wîkî îe.',
),
'ویکیپەدیا ەنسیکلۆپەدیەکەئا زاد ب رەنگێ ویکی یە.'
),
);
}
}