From 9fae06c40c167f90808caa671868ed4aa8053b8c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 22 Mar 2016 17:58:37 +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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/thinkphp/library/think/loaderTest.php b/tests/thinkphp/library/think/loaderTest.php index c13b4390..88fe65cc 100644 --- a/tests/thinkphp/library/think/loaderTest.php +++ b/tests/thinkphp/library/think/loaderTest.php @@ -42,6 +42,13 @@ class loaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals(true, Loader::autoload('top\test\Hello')); } + public function testAddNamespaceAlias() + { + Loader::addNamespaceAlias('top', 'top\test'); + Loader::addNamespaceAlias(['top' => 'top\test', 'app' => 'app\index']); + $this->assertEquals(true, Loader::autoload('top\Hello')); + } + public function testTable() { Loader::table('', [