修正model类

This commit is contained in:
thinkphp
2016-03-04 17:42:17 +08:00
parent c7be6204c9
commit e124d1f9dc
2 changed files with 28 additions and 28 deletions

View File

@@ -52,10 +52,13 @@ class langTest extends \PHPUnit_Framework_TestCase
Config::set('lang_list', ['zh-cn', 'zh-tw']);
Lang::set('hello', '欢迎', 'zh-cn');
Lang::set('hello', '歡迎', 'zh-tw');
/*
Config::set('lang_detect_var', 'lang');
Config::set('lang_cookie_var', 'think_cookie');
$_GET['lang'] = 'zh-tw';
Lang::detect();
$this->assertEquals('歡迎',Lang::get('hello') );*/
$this->assertEquals('歡迎', Lang::get('hello'));
$_GET['lang'] = 'zh-cn';
Lang::detect();