summaryrefslogtreecommitdiff
path: root/www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php')
-rw-r--r--www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php b/www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php
new file mode 100644
index 00000000..1d0f8635
--- /dev/null
+++ b/www/wiki/tests/phpunit/languages/classes/LanguageShiTest.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @covers LanguageShi
+ * @covers ShiConverter
+ */
+class LanguageShiTest extends LanguageClassesTestCase {
+ /**
+ * @dataProvider provideAutoConvertToAllVariants
+ * @covers Language::autoConvertToAllVariants
+ */
+ public function testAutoConvertToAllVariants( $result, $value ) {
+ $this->assertEquals( $result, $this->getLang()->autoConvertToAllVariants( $value ) );
+ }
+
+ public static function provideAutoConvertToAllVariants() {
+ return [
+ [
+ [
+ 'shi' => 'AƔ',
+ 'shi-tfng' => 'ⴰⵖ',
+ 'shi-latn' => 'AƔ',
+ ],
+ 'AƔ'
+ ],
+ [
+ [
+ 'shi' => 'ⴰⵖ',
+ 'shi-tfng' => 'ⴰⵖ',
+ 'shi-latn' => 'aɣ',
+ ],
+ 'ⴰⵖ'
+ ],
+ ];
+ }
+}