mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-02 21:52:34 +08:00
修正单元测试
This commit is contained in:
@@ -54,10 +54,10 @@ class appTest extends \PHPUnit_Framework_TestCase
|
||||
$this->expectOutputString($expectOutputString);
|
||||
|
||||
$rc = new ReflectionClass('\think\Loader');
|
||||
$ns = $rc->getProperty('namespace');
|
||||
$ns = $rc->getProperty('prefixDirsPsr4');
|
||||
$ns->setAccessible(true);
|
||||
$namespace = $ns->getValue();
|
||||
$this->assertEquals(TEST_PATH, $namespace['tests']);
|
||||
$this->assertEquals([TEST_PATH], $namespace['tests\\']);
|
||||
|
||||
$this->assertEquals(true, function_exists('lang'));
|
||||
$this->assertEquals(true, function_exists('config'));
|
||||
|
||||
@@ -84,7 +84,7 @@ class routeTest extends \PHPUnit_Framework_TestCase
|
||||
Route::map('hello', 'index/hello');
|
||||
$this->assertEquals('index/hello', Route::map('hello'));
|
||||
$result = Route::check($request, 'hello');
|
||||
$this->assertEquals(['index', 'hello', null], $result['module']);
|
||||
$this->assertEquals([null, 'index', 'hello'], $result['module']);
|
||||
}
|
||||
|
||||
public function testMixVar()
|
||||
|
||||
Reference in New Issue
Block a user