cooper/hyperf-pest

Pest Testing for hyperf

v1.1.0 2023-07-20 00:42 UTC

This package is auto-updated.

Last update: 2024-12-20 03:35:34 UTC


README

Tests Latest Stable Version Total Downloads

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.jsonscripts 添加命令快捷方式:"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.