diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-07-28 11:19:53 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-07-28 11:19:53 +0200 |
commit | 7982c3ff183aa985177bdaeacda4feb22a739e00 (patch) | |
tree | 728e07251072f3a1df63c017c0dce54fa1acb390 /tests/LanguagesTest.php | |
parent | 2075321f6569dfa610905991b315aae1956b7f78 (diff) | |
parent | ed7e1be12d65bdb1b924c7efb6a84fd591192c6c (diff) | |
download | Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.gz Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.zst Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.zip |
Merge tag 'v0.10.0' into latest
Release v0.10.0
Diffstat (limited to 'tests/LanguagesTest.php')
-rw-r--r-- | tests/LanguagesTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/LanguagesTest.php b/tests/LanguagesTest.php index 864ce630..4951e09a 100644 --- a/tests/LanguagesTest.php +++ b/tests/LanguagesTest.php | |||
@@ -176,6 +176,32 @@ class LanguagesTest extends \PHPUnit_Framework_TestCase | |||
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * Test t() with an extension language file coming from the theme in gettext mode | ||
180 | */ | ||
181 | public function testTranslationThemeExtensionGettext() | ||
182 | { | ||
183 | $this->conf->set('translation.mode', 'gettext'); | ||
184 | $this->conf->set('raintpl_tpl', 'tests/utils/customtpl/'); | ||
185 | $this->conf->set('theme', 'dummy'); | ||
186 | new Languages('en', $this->conf); | ||
187 | $txt = 'rooster'; // ignore me poedit | ||
188 | $this->assertEquals('rooster', t($txt, $txt, 1, 'dummy')); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * Test t() with an extension language file coming from the theme in PHP mode | ||
193 | */ | ||
194 | public function testTranslationThemeExtensionPhp() | ||
195 | { | ||
196 | $this->conf->set('translation.mode', 'php'); | ||
197 | $this->conf->set('raintpl_tpl', 'tests/utils/customtpl/'); | ||
198 | $this->conf->set('theme', 'dummy'); | ||
199 | new Languages('en', $this->conf); | ||
200 | $txt = 'rooster'; // ignore me poedit | ||
201 | $this->assertEquals('rooster', t($txt, $txt, 1, 'dummy')); | ||
202 | } | ||
203 | |||
204 | /** | ||
179 | * Test t() with an extension language file in gettext mode | 205 | * Test t() with an extension language file in gettext mode |
180 | */ | 206 | */ |
181 | public function testTranslationExtensionGettext() | 207 | public function testTranslationExtensionGettext() |