stanley-king 4 vuotta sitten
vanhempi
commit
0e677ca27c
4 muutettua tiedostoa jossa 2 lisäystä ja 62 poistoa
  1. 0 21
      tests/ExampleTest.php
  2. 0 15
      tests/LoginTest.php
  3. 0 25
      tests/TestCase.php
  4. 2 1
      tests/TestIndex.php

+ 0 - 21
tests/ExampleTest.php

@@ -1,21 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: yunwuxin <448901948@qq.com>
-// +----------------------------------------------------------------------
-namespace tests;
-
-class ExampleTest extends TestCase
-{
-
-    public function testBasicExample()
-    {
-        $x = 100;
-        $this->visit('/')->see('ThinkPHP');
-    }
-}

+ 0 - 15
tests/LoginTest.php

@@ -1,15 +0,0 @@
-<?php
-
-namespace tests;
-
-use PHPUnit\Framework\TestCase;
-
-class LoginTest extends TestCase
-{
-    public function testBasicExample()
-    {
-        $x = 100;
-        $this->visit('/')->see('ThinkPHP');
-    }
-
-}

+ 0 - 25
tests/TestCase.php

@@ -1,25 +0,0 @@
-<?php
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: yunwuxin <448901948@qq.com>
-// +----------------------------------------------------------------------
-namespace tests;
-
-class TestCase extends \think\testing\TestCase
-{
-    protected $baseUrl = 'http://localhost';
-
-    public function __construct(?string $name = null, array $data = [], string $dataName = '') {
-        // 引入需要的环境
-        require_once __DIR__ . '/../thinkphp/base.php';
-        // 初始化 App 对象,并将 APP_PATH 指向项目的 application 目录
-        App::getInstance()->path(__DIR__ . '/../application/')->initialize();
-
-        parent::__construct($name, $data, $dataName);
-    }
-}

+ 2 - 1
tests/TestIndex.php

@@ -15,11 +15,12 @@ use PHPUnit\Framework\TestCase;
 
 class TestIndex extends TestCase
 {
+    protected $baseUrl = 'http://localhost';
     public static function setUpBeforeClass() : void
     {
         App::getInstance()->path(BASE_ROOT_PATH . '/application/')->initialize();
     }
-    
+
     public function testInviteBonus()
     {
         $obj = new \app\index\controller\Index;