Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/myxiaoao/hyperf-pest

Pest Testing for Hyperf
https://github.com/myxiaoao/hyperf-pest

hyperf pest testing

Last synced: 2 days ago
JSON representation

Pest Testing for Hyperf

Awesome Lists containing this project

README

        

# Pest Testing for Hyperf

Tests


Latest Stable Version


Total Downloads

[Pest](https://pestphp.com/) 是一个注重简单性的优雅 PHP 测试框架.

### 1.安装 Hyperf-skeleton (已有 Hyperf 项目请忽略)

https://github.com/hyperf/hyperf-skeleton

```php
composer create-project hyperf/hyperf-skeleton
```

### 2.使用 Composer 安装

```php
composer require cooper/hyperf-pest
```

执行
```php
php bin/hyperf.php vendor:publish cooper/hyperf-pest
```

### 3.测试命令

```php
./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"`;
* 语法请看[官方文档](https://pestphp.com/docs/writing-tests);
* 按照 `phpunit` 写测试也是可以的。

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.