unit test

This commit is contained in:
conory 2016-03-03 12:45:35 +09:00
parent 6a351265ff
commit e5ae4a828a

View file

@ -14,17 +14,17 @@ class LangTest extends \Codeception\TestCase\Test
$jp = Rhymix\Framework\Lang::getInstance('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('Help', $en->get('common.help'));
$this->assertEquals('도움말', $ko->help);
$this->assertEquals('Help', $en->help);
$this->assertEquals('nonexistent', $ko->get('common.nonexistent'));
$this->assertEquals('nonexistent', $ko->get('common.nonexistent', 'foo', 'bar'));
$this->assertEquals('help', $ja->help);
$ja->loadPlugin('common');
$this->assertEquals('ヘルプ', $ja->help);
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent'));
$this->assertEquals('common.nonexistent', $ko->get('common.nonexistent', 'foo', 'bar'));
$ko->foobartestlang = '%s님 안녕하세요?';
$this->assertEquals('Travis님 안녕하세요?', $ko->foobartestlang('Travis'));