Pest 是一个注重简单性的优雅 PHP 测试框架.
https://github.com/hyperf/hyperf-skeleton
composer create-project hyperf/hyperf-skeleton
composer require cooper/hyperf-pest
执行
php bin/hyperf.php vendor:publish cooper/hyperf-pest
./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
写测试也是可以的。
The MIT License (MIT). Please see License File for more information.