Skip to content

Commit

Permalink
注册tests命名空间
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Jul 29, 2016
1 parent 31aca50 commit cfbb09d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions example/tests/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace tests;

class ExampleTest extends TestCase
{
Expand Down
1 change: 1 addition & 0 deletions example/tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace tests;

class TestCase extends \think\testing\TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions src/command/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function configure()

public function execute(Input $input, Output $output)
{
Loader::addClassMap('TestCase', ROOT_PATH . 'tests/TestCase.php');
Loader::addClassMap('think\App', CORE_PATH . 'App' . EXT);
//注册命名空间
Loader::addNamespace('tests', ROOT_PATH . 'tests');

Session::init();
$argv = $_SERVER['argv'];
Expand Down

0 comments on commit cfbb09d

Please sign in to comment.