fix(1): 增加 pestphp 默认引入

Closes #1

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-05-12 15:47:00 +08:00
parent 4082d97d76
commit 27ba5b0c53
2 changed files with 137 additions and 100 deletions

View File

@@ -39,27 +39,34 @@
"require": {
"php": "^8.1",
"composer/composer": ">=2.5.5",
"hyperf/db-connection": "^3.0.15",
"hyperf/session": "^3.0.15",
"hyperf/validation": "^3.0.15",
"singularity/hdk-core": "^0.2.12",
"hyperf/constants": "^3.0.18",
"hyperf/database": "^3.0.18",
"hyperf/db-connection": "^3.0.18",
"hyperf/di": "^3.0.18",
"hyperf/paginator": "^3.0.18",
"hyperf/session": "^3.0.18",
"hyperf/translation": "^3.0.18",
"hyperf/validation": "^3.0.18",
"singularity/hdk-core": "^0.2.17",
"symfony/polyfill-php81": "^1.27.0"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "^2.8.5",
"friendsofphp/php-cs-fixer": "^v3.16.0",
"hyperf/devtool": "^3.0.15",
"hyperf/testing": "^3.0.15",
"phpstan/phpstan": "^1.10.11",
"swoole/ide-helper": "^4.8.13",
"singularity/hdk-auth": "^0.2.2",
"singularity/hyperf-saml": "^0.2.3"
"hyperf/devtool": "^3.0.18",
"hyperf/testing": "^3.0.18",
"pestphp/pest": "^1.23",
"phpstan/phpstan": "^1.10.15",
"swoole/ide-helper": "^4.8.13"
},
"prefer-stable": true,
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"secure-http": false
"secure-http": false,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"scripts": {
"pre-install-cmd": "Installer\\Script::install",

30
test/Pest.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
|
*/
// uses(Tests\TestCase::class)->in('Feature');
/*
|--------------------------------------------------------------------------
| Functions
|--------------------------------------------------------------------------
|
| While Pest is very powerful out-of-the-box, you may have some testing code specific to your
| project that you don't want to repeat in every file. Here you can also expose helpers as
| global functions to help you to reduce the number of lines of code in your test files.
|
*/
/*function something()
{
// ..
}*/