diff options
Diffstat (limited to 'tests/languages')
-rw-r--r-- | tests/languages/fr/LanguagesFrTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/languages/fr/LanguagesFrTest.php b/tests/languages/fr/LanguagesFrTest.php index 79d05172..0cf74891 100644 --- a/tests/languages/fr/LanguagesFrTest.php +++ b/tests/languages/fr/LanguagesFrTest.php | |||
@@ -172,4 +172,30 @@ class LanguagesFrTest extends \PHPUnit_Framework_TestCase | |||
172 | $this->assertEquals('voiture', t($txt, $txt, 1, 'test')); | 172 | $this->assertEquals('voiture', t($txt, $txt, 1, 'test')); |
173 | $this->assertEquals('Fouille', t('Search', 'Search', 1, 'test')); | 173 | $this->assertEquals('Fouille', t('Search', 'Search', 1, 'test')); |
174 | } | 174 | } |
175 | |||
176 | /** | ||
177 | * Test t() with an extension language file coming from the theme in gettext mode | ||
178 | */ | ||
179 | public function testTranslationThemeExtensionGettext() | ||
180 | { | ||
181 | $this->conf->set('translation.mode', 'gettext'); | ||
182 | $this->conf->set('raintpl_tpl', 'tests/utils/customtpl/'); | ||
183 | $this->conf->set('theme', 'dummy'); | ||
184 | new Languages('en', $this->conf); | ||
185 | $txt = 'rooster'; // ignore me poedit | ||
186 | $this->assertEquals('coq', t($txt, $txt, 1, 'dummy')); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * Test t() with an extension language file coming from the theme in PHP mode | ||
191 | */ | ||
192 | public function testTranslationThemeExtensionPhp() | ||
193 | { | ||
194 | $this->conf->set('translation.mode', 'php'); | ||
195 | $this->conf->set('raintpl_tpl', 'tests/utils/customtpl/'); | ||
196 | $this->conf->set('theme', 'dummy'); | ||
197 | new Languages('en', $this->conf); | ||
198 | $txt = 'rooster'; // ignore me poedit | ||
199 | $this->assertEquals('coq', t($txt, $txt, 1, 'dummy')); | ||
200 | } | ||
175 | } | 201 | } |