Some unit test for include/language.php

Unfortunately not so much unit testable, but added in preparation to
update LanguageDetect and Intl library.
This commit is contained in:
Klaus Weidenbach
2017-10-24 16:33:58 +02:00
parent a782c9944c
commit fe5f1e4d67
2 changed files with 167 additions and 0 deletions

View File

@@ -322,6 +322,8 @@ function get_language_name($s, $l = null) {
$language = $languageRepository->get($s, $l);
} catch (CommerceGuys\Intl\Exception\UnknownLanguageException $e) {
return $s; // Give up
} catch (CommerceGuys\Intl\Exception\UnknownLocaleException $e) {
return $s; // Give up
}
}