定制 wsteel/tp60unit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wsteel/tp60unit

Composer 安装命令:

composer require wsteel/tp60unit

包简介

A simple unit test for thinkphp6.0

README 文档

README

test thinkphp6.0 app's logic by phpstorm 2020

usage

composer require wsteel/php60unit

require

"php": ">=7.2.0",
"topthink/framework": "6.0.*"
"phpunit/phpunit": "8.*"

phpstorm setting

File | Settings | Languages & Frameworks | PHP | Test Frameworks

PHPUnit library -> Path to phpunit.phar -> _YOUR_phpunit-*.phar

Test Runner -> Default bootstrap file:  __YOUR_APP__\vendor\autoload.php

demo

filename

tests/demo/demoTest.php

content

namespace tests\demo;

use wsteel\tp60unit\TestCase;

class demoTest extends TestCase
{

    public function testTrue()
    {
        $this->assertTrue(true);
    }

    public function testFalse()
    {
        $this->assertFalse(false, 'false');
    }


    public function testModel()
    {
        $e = \app\model\User::find(1);
        dump($e);
        $this->assertNotEmpty($e);
    }

    public function testDB()
    {
        $user = Db::name('user');
        $e = $user->where('id', '=' ,1)->select();
        dump($e);
        $this->assertNotEmpty($e);
    }

    public function testConfig()
    {
        $config = config('database');
        dump($config);
        $this->assertNotEmpty($config);
    }
}

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固