Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/myxiaoao/hyperf-pest
- Owner: myxiaoao
- License: mit
- Created: 2022-07-16T07:49:17.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T00:43:05.000Z (over 1 year ago)
- Last Synced: 2024-04-19T21:15:00.839Z (7 months ago)
- Topics: hyperf, pest, testing
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[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.