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