From b305bc04ef60ed7e9e482b79a4984cd3388ed31e Mon Sep 17 00:00:00 2001 From: oldrind <1401019000@qq.com> Date: Wed, 2 Mar 2016 15:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9medelTest=E7=B1=BB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=BF=9E=E6=8E=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/modelTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/thinkphp/library/think/modelTest.php b/tests/thinkphp/library/think/modelTest.php index 50573dd1..1f36d1ad 100644 --- a/tests/thinkphp/library/think/modelTest.php +++ b/tests/thinkphp/library/think/modelTest.php @@ -21,13 +21,12 @@ class modelTest extends \PHPUnit_Framework_TestCase { public function getConfig() { - static $config; - if (!isset($config)) { - $config = \think\Input::get('database'); - $config['database'] = 'test'; - $config['username'] = 'root'; - $config['password'] = ''; - } + $config = [ + 'type' => 'mysql', + 'database' => 'test', + 'username' => 'root', + 'password' => '', + ]; return $config; }