mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[task/functional] Make sure missing language values are handled properly
PHPBB3-10758
This commit is contained in:
parent
8cf0b79a47
commit
b82c77b38f
2 changed files with 9 additions and 1 deletions
|
@ -18,6 +18,14 @@ class phpbb_functional_lang_test extends phpbb_functional_test_case
|
||||||
$this->assertEquals('Board index', $this->lang('FORUM_INDEX'));
|
$this->assertEquals('Board index', $this->lang('FORUM_INDEX'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException RuntimeException
|
||||||
|
*/
|
||||||
|
public function test_lang_missing()
|
||||||
|
{
|
||||||
|
$this->assertEquals('Your account has now been activated. Thank you for registering.', $this->lang('ACCOUNT_ACTIVE'));
|
||||||
|
}
|
||||||
|
|
||||||
public function test_add_lang()
|
public function test_add_lang()
|
||||||
{
|
{
|
||||||
$this->add_lang('ucp');
|
$this->add_lang('ucp');
|
||||||
|
|
|
@ -229,7 +229,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
|
|
||||||
if (empty($this->lang[$key]))
|
if (empty($this->lang[$key]))
|
||||||
{
|
{
|
||||||
throw new Exception('Language key "' . $key . '" could not be found.');
|
throw new RuntimeException('Language key "' . $key . '" could not be found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$args[0] = $this->lang[$key];
|
$args[0] = $this->lang[$key];
|
||||||
|
|
Loading…
Add table
Reference in a new issue