diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
commit | 38672ba0d1c722e5d6d33a58255ceb55e9410e46 (patch) | |
tree | dae4c7c47532380eac3ae641db99122fc77c93dc /tests/languages/fr/LanguagesFrTest.php | |
parent | 83faedadff76c5bdca036f39f13943f63b27e164 (diff) | |
parent | 1e77e0448bbd25675d8c0fe4a73206ad9048904b (diff) | |
download | Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.gz Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.zst Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.zip |
Merge tag 'v0.10.4' into stable
Release v0.10.4
Diffstat (limited to 'tests/languages/fr/LanguagesFrTest.php')
-rw-r--r-- | tests/languages/fr/LanguagesFrTest.php | 27 |
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 | ||
4 | namespace Shaarli; | 4 | namespace Shaarli; |
5 | 5 | ||
6 | |||
7 | use Shaarli\Config\ConfigManager; | 6 | use 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 | } |