1234567891011121314151617181920212223242526272829 |
- <?php
- namespace think;
- // 加载基础文件
- define('BASE_ROOT_PATH',str_replace('/tests','',dirname(__FILE__)));
- define('BASE_PATH',BASE_ROOT_PATH . '/tests');
- define('APP_ID','tests');
- require BASE_ROOT_PATH . '/thinkphp/base.php';
- use PHPUnit\Framework\TestCase;
- class TestIndex extends TestCase
- {
- public static function setUpBeforeClass() : void
- {
- App::getInstance()->path(BASE_ROOT_PATH . '/application/')->initialize();
- }
-
- public function testInviteBonus()
- {
- $obj = new \app\index\controller\Index;
- $obj->index();
- }
- }
|