Fix unit tests, and auto-load default lang if not loaded

This commit is contained in:
Kijin Sung 2016-02-18 08:49:57 +09:00
parent c67dbbc659
commit 1a3c500c76
2 changed files with 19 additions and 24 deletions

View file

@ -77,8 +77,8 @@ class DateTimeTest extends \Codeception\TestCase\Test
public function testGetTimeGap()
{
Context::getInstance()->lang = Rhymix\Framework\Lang::getInstance('en');
Context::getInstance()->lang->loadPlugin('common');
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance('en');
$GLOBALS['lang']->loadPlugin('common');
// Test getTimeGap() when the internal time zone is different from the default time zone.
Rhymix\Framework\Config::set('locale.internal_timezone', 10800);