phpbb / phpbb-ext-acme-demo

ACME Demo Extension for phpBB: http://en.wikipedia.org/wiki/Acme_Corporation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support adding extension lang files in functional tests

iMattPro opened this issue · comments

Add to functional_test_case.php

protected function add_lang_ext($lang_file)
{
    if (is_array($lang_file))
    {
        foreach ($lang_file as $file)
        {
            $this->add_lang_ext($file);
        }

        return;
    }

    $lang_path = __DIR__ . "/../../language/en/$lang_file.php";

    $lang = array();

    if (file_exists($lang_path))
    {
        include($lang_path);
    }

    $this->lang = array_merge($this->lang, $lang);
}