From 2b4535df7623f238e86d3b5257a3cc279f62768c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 22 Mar 2016 17:51:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84loaderTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/loaderTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/thinkphp/library/think/loaderTest.php b/tests/thinkphp/library/think/loaderTest.php index 8ad5673f..c13b4390 100644 --- a/tests/thinkphp/library/think/loaderTest.php +++ b/tests/thinkphp/library/think/loaderTest.php @@ -42,6 +42,23 @@ class loaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals(true, Loader::autoload('top\test\Hello')); } + public function testTable() + { + Loader::table('', [ + 'connection' => [ + 'type' => 'mysql', + 'database' => 'test', + 'username' => 'root', + 'password' => '', + ]]); + Loader::db('mysql://root@127.0.0.1/test#utf8'); + } + + public function testInstance() + { + Loader::instance('\think\Validate'); + } + public function testImport() { $this->assertEquals(true, Loader::import('think.log.driver.Sae'));