From bd8b8261a82424bca2ac257f71fc9202bde58d11 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 22 Mar 2016 12:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0dbTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/dbTest.php | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/thinkphp/library/think/dbTest.php diff --git a/tests/thinkphp/library/think/dbTest.php b/tests/thinkphp/library/think/dbTest.php new file mode 100644 index 00000000..d3159b04 --- /dev/null +++ b/tests/thinkphp/library/think/dbTest.php @@ -0,0 +1,28 @@ + +// +---------------------------------------------------------------------- + +/** + * Db类测试 + */ + +namespace tests\thinkphp\library\think; + +use \think\Db; + +class dbTest extends \PHPUnit_Framework_TestCase +{ + public function testConnect() + { + Db::connect('mysql://root@127.0.0.1/test#utf8'); + Db::execute('show databases'); + } + +}