Skip to content

Commit 5450c08

Browse files
committed
Add extension lang files to extension functional test case
1 parent 404504e commit 5450c08

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tests/framework/extension_functional_test_case.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,31 @@ protected function is_available()
195195

196196
return $is_available;
197197
}
198+
199+
/**
200+
* Add Language Items from an extension
201+
*
202+
* @param mixed $lang_set specifies the language entries to include
203+
*/
204+
protected function add_lang_ext($lang_file)
205+
{
206+
if (is_array($lang_file))
207+
{
208+
foreach ($lang_file as $file)
209+
{
210+
$this->add_lang_ext($file);
211+
}
212+
}
213+
214+
$lang_path = __DIR__ . "/../../language/en/$lang_file.php";
215+
216+
$lang = array();
217+
218+
if (file_exists($lang_path))
219+
{
220+
include($lang_path);
221+
}
222+
223+
$this->lang = array_merge($this->lang, $lang);
224+
}
198225
}

0 commit comments

Comments
 (0)