diff --git a/test/Translator/TranslatorTest.php b/test/Translator/TranslatorTest.php index 768c2ac6..c865581f 100644 --- a/test/Translator/TranslatorTest.php +++ b/test/Translator/TranslatorTest.php @@ -549,4 +549,17 @@ public function testNullMessageArgumentShouldReturnAnEmptyString(): void self::assertEquals('', $this->translator->translate(null)); } + + public function testTranslateWithEmptyStringLocale(): void + { + $this->translator->setLocale('en_US'); + $this->translator->addTranslationFile( + 'phparray', + $this->testFilesDir . '/testarray/translation-more-en_US.php', + 'default', + 'en_US' + ); + + self::assertEquals('Message 8 (en)', $this->translator->translate('Message 8', 'default', '')); + } }