topphp / topphp-testing
单元测试组件
v1.0.2
2020-09-24 08:07 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
- mockery/mockery: ^1.0
- phpunit/phpunit: ^8.0.0
- topphp/topphp-client: ^1.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.5
- swoole/ide-helper: ^4.4.0
README
单元测试组件,除了具备phpunit的功能外,又集成了topphp客户端,可以进行http请求
支持 get,post,delete,put,patch 等等操作
Structure
组件结构
bin/
config/
src/
tests/
vendor/
安装
安装组件
composer require topphp/topphp-testing
用法
单元测试文件只需要继承 HttpTestCase 即可通过如下方式调用http请求: self::$httpClient->get("http://www.baidu.com");
修改日志
有关最近更改的内容的详细信息,请参阅更改日志(CHANGELOG)。
测试
组件单元测试 ./vendor/bin/phpunit tests/ExampleTest.php
贡献
详情请参阅贡献(CONTRIBUTING)和行为准则(CODE_OF_CONDUCT)。
安全
如果您发现任何与安全相关的问题,请发送电子邮件至sleep@kaitoocn.com,而不要使用问题跟踪器。
信用
许可证
The MIT License (MIT). Please see License File for more information.