修改medelTest类数据库连接配置

This commit is contained in:
oldrind
2016-03-02 15:35:19 +08:00
parent 7e66268307
commit b305bc04ef

View File

@@ -21,13 +21,12 @@ class modelTest extends \PHPUnit_Framework_TestCase
{ {
public function getConfig() public function getConfig()
{ {
static $config; $config = [
if (!isset($config)) { 'type' => 'mysql',
$config = \think\Input::get('database'); 'database' => 'test',
$config['database'] = 'test'; 'username' => 'root',
$config['username'] = 'root'; 'password' => '',
$config['password'] = ''; ];
}
return $config; return $config;
} }