mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
unit test2
This commit is contained in:
parent
e5ae4a828a
commit
b727466e61
1 changed files with 6 additions and 4 deletions
|
|
@ -14,10 +14,6 @@ class LangTest extends \Codeception\TestCase\Test
|
||||||
$jp = Rhymix\Framework\Lang::getInstance('jp');
|
$jp = Rhymix\Framework\Lang::getInstance('jp');
|
||||||
$this->assertTrue($ja === $jp);
|
$this->assertTrue($ja === $jp);
|
||||||
|
|
||||||
$this->assertEquals('help', $ja->help);
|
|
||||||
$ja->loadPlugin('common');
|
|
||||||
$this->assertEquals('ヘルプ', $ja->help);
|
|
||||||
|
|
||||||
$this->assertEquals('도움말', $ko->get('common.help'));
|
$this->assertEquals('도움말', $ko->get('common.help'));
|
||||||
$this->assertEquals('Help', $en->get('common.help'));
|
$this->assertEquals('Help', $en->get('common.help'));
|
||||||
$this->assertEquals('도움말', $ko->help);
|
$this->assertEquals('도움말', $ko->help);
|
||||||
|
|
@ -26,6 +22,12 @@ class LangTest extends \Codeception\TestCase\Test
|
||||||
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent'));
|
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent'));
|
||||||
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent', 'foo', 'bar'));
|
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent', 'foo', 'bar'));
|
||||||
|
|
||||||
|
$this->assertEquals('admin.help', $ko->get('admin.help'));
|
||||||
|
$this->assertEquals('admin.help', $en->get('admin.help'));
|
||||||
|
|
||||||
|
$ja->loadPlugin('common');
|
||||||
|
$this->assertEquals('ヘルプ', $ja->help);
|
||||||
|
|
||||||
$ko->foobartestlang = '%s님 안녕하세요?';
|
$ko->foobartestlang = '%s님 안녕하세요?';
|
||||||
$this->assertEquals('Travis님 안녕하세요?', $ko->foobartestlang('Travis'));
|
$this->assertEquals('Travis님 안녕하세요?', $ko->foobartestlang('Travis'));
|
||||||
$en->foobartestlang = 'Hello, %s!';
|
$en->foobartestlang = 'Hello, %s!';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue