[CI] Update LangTest

This commit is contained in:
ruan 2020-08-06 16:44:24 +02:00
parent b2c00c66c3
commit e975ab8001
2 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ class Page {
$this->defaultlang = new en_US();
require_once './lang/' . $settings->lang . '.php';
$lang_class = substr($settings->lang,0, strpos($settings->lang, ".")); // grab "en_US" from "en_US.utf8"
$lang_class = substr($settings->lang, 0, strpos($settings->lang, ".")); // grab "en_US" from "en_US.utf8"
if ($lang_class !== "en_US" && class_exists($lang_class)) {
$this->lang = new $lang_class;
} else {

View File

@ -16,10 +16,11 @@ final class LangTest extends TestCase {
echo("Testing $lang_class ($lang)... ");
$instance = new $lang_class;
$this->assertTrue(is_array($instance->array));
$this->assertIsArray($instance->array);
$this->assertNotEmpty($instance->array);
$this->assertContainsOnly("string", $instance->array);
$count = sizeof($instance->array);
$this->assertTrue($count > 0);
echo "Success. $count messages defined.\n";
}