cooper/hyperf-pest
Pest Testing for hyperf
29
2
| Install | |
|---|---|
composer require cooper/hyperf-pest |
|
| Latest Version: | v1.1.0 |
| PHP: | >=8.0 |
| License: | MIT |
| Last Updated: | Jul 20, 2023 |
| Links: | GitHub · Packagist |
Maintainer: huanghua581
Pest Testing for Hyperf
Pest 是一个注重简单性的优雅 PHP 测试框架.
1.安装 Hyperf-skeleton (已有 Hyperf 项目请忽略)
https://github.com/hyperf/hyperf-skeleton
composer create-project hyperf/hyperf-skeleton
2.使用 Composer 安装
composer require cooper/hyperf-pest
执行
php bin/hyperf.php vendor:publish cooper/hyperf-pest
3.测试命令
./vendor/bin/co-pest --prepend test/bootstrap.php -c phpunit.xml
提示
- 在
composer.json中scripts添加命令快捷方式:"pest": "co-pest --prepend test/bootstrap.php -c phpunit.xml --colors=always"; - 语法请看官方文档;
- 按照
phpunit写测试也是可以的。
License
The MIT License (MIT). Please see License File for more information.