aboutsummaryrefslogtreecommitdiffstats
path: root/tests/language/language_test.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-01-26 22:32:08 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-01-26 23:45:51 +0100
commitf5ca8c363bbd6776e9be8d2e05c3cf54685b0a59 (patch)
treefb30f1d852da9060b3ac033a36ad283ad3c667ae /tests/language/language_test.php
parent56062a2635551c29b1b983e000f0d1ee6a482fb9 (diff)
downloadforums-f5ca8c363bbd6776e9be8d2e05c3cf54685b0a59.tar
forums-f5ca8c363bbd6776e9be8d2e05c3cf54685b0a59.tar.gz
forums-f5ca8c363bbd6776e9be8d2e05c3cf54685b0a59.tar.bz2
forums-f5ca8c363bbd6776e9be8d2e05c3cf54685b0a59.tar.xz
forums-f5ca8c363bbd6776e9be8d2e05c3cf54685b0a59.zip
[ticket/14432] Adds a method to get raw language values
PHPBB3-14432
Diffstat (limited to 'tests/language/language_test.php')
-rw-r--r--tests/language/language_test.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/language/language_test.php b/tests/language/language_test.php
index 6a814e39dc..29b4873dcb 100644
--- a/tests/language/language_test.php
+++ b/tests/language/language_test.php
@@ -53,6 +53,25 @@ class phpbb_language_test extends phpbb_test_case
$this->assertFalse($this->lang->is_set(array('PHPBB', 'PHP')));
}
+ public function test_lang_raw()
+ {
+ $this->assertEquals($this->lang->lang_raw('FOO'), 'BAR');
+ $this->assertEquals($this->lang->lang_raw('VOID'), 'VOID');
+ $this->assertEquals($this->lang->lang_raw('ARRY'), array(
+ 0 => 'No posts', // 0
+ 1 => '1 post', // 1
+ 2 => '%d posts', // 2+
+ ));
+ }
+
+ public function test_lang_array()
+ {
+ $this->assertEquals($this->lang->lang_array('FOO'), 'BAR');
+ $this->assertEquals($this->lang->lang_array('VOID'), 'VOID');
+ $this->assertEquals($this->lang->lang_array('ARRY', [0]), 'No posts');
+ $this->assertEquals($this->lang->lang_array('FOO', [2, 3, 'BARZ']), 'BAR');
+ }
+
public function test_lang()
{
// No param