mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
[CI] Update LangTest
This commit is contained in:
parent
b2c00c66c3
commit
e975ab8001
@ -12,7 +12,7 @@ class Page {
|
|||||||
$this->defaultlang = new en_US();
|
$this->defaultlang = new en_US();
|
||||||
|
|
||||||
require_once './lang/' . $settings->lang . '.php';
|
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)) {
|
if ($lang_class !== "en_US" && class_exists($lang_class)) {
|
||||||
$this->lang = new $lang_class;
|
$this->lang = new $lang_class;
|
||||||
} else {
|
} else {
|
||||||
|
@ -16,10 +16,11 @@ final class LangTest extends TestCase {
|
|||||||
|
|
||||||
echo("Testing $lang_class ($lang)... ");
|
echo("Testing $lang_class ($lang)... ");
|
||||||
$instance = new $lang_class;
|
$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);
|
$count = sizeof($instance->array);
|
||||||
$this->assertTrue($count > 0);
|
|
||||||
|
|
||||||
echo "Success. $count messages defined.\n";
|
echo "Success. $count messages defined.\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user