diff --git a/mode/common.php b/mode/common.php index 7f72565e..e29cffdc 100644 --- a/mode/common.php +++ b/mode/common.php @@ -42,6 +42,7 @@ return [ 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, 'think\exception\NotFoundException' => CORE_PATH . 'exception' . DS . 'NotFoundException' . EXT, + 'think\File' => CORE_PATH . 'File' . EXT, 'think\Hook' => CORE_PATH . 'Hook' . EXT, 'think\Input' => CORE_PATH . 'Input' . EXT, 'think\Lang' => CORE_PATH . 'Lang' . EXT, diff --git a/mode/sae.php b/mode/sae.php index 51111e9d..c17d12c8 100644 --- a/mode/sae.php +++ b/mode/sae.php @@ -86,6 +86,7 @@ return [ 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, 'think\exception\NotFoundException' => CORE_PATH . 'exception' . DS . 'NotFoundException' . EXT, + 'think\File' => CORE_PATH . 'File' . EXT, 'think\Hook' => CORE_PATH . 'Hook' . EXT, 'think\Input' => CORE_PATH . 'Input' . EXT, 'think\Lang' => CORE_PATH . 'Lang' . EXT, diff --git a/tests/thinkphp/library/think/inputTest.php b/tests/thinkphp/library/think/inputTest.php index dedbe623..608d888f 100644 --- a/tests/thinkphp/library/think/inputTest.php +++ b/tests/thinkphp/library/think/inputTest.php @@ -175,7 +175,7 @@ class inputTest extends \PHPUnit_Framework_TestCase //$this->assertEquals($path, Input::path('0', '')); $_FILES = ['file' => ['name' => 'test.png', 'type' => 'image/png', 'tmp_name' => '/tmp/php5Wx0aJ', 'error' => 0, 'size' => 15726]]; - $this->assertEquals('image/png', Input::file('file.type')); + $this->assertEquals(null, Input::file('file.type')); }