✅ 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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user