Skip to content

Commit e7a8bd7

Browse files
authored
Migrates tests from PHPUnit to Pest (#4)
Replaces PHPUnit with Pest for testing. This change enhances test writing experience, improves readability, and simplifies test structure by adopting Pest's expressive syntax. Updates CI workflow and composer dependencies to reflect the migration to Pest.
1 parent f8b0486 commit e7a8bd7

File tree

8 files changed

+1324
-295
lines changed

8 files changed

+1324
-295
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
branches: [ develop, main ]
88

99
jobs:
10-
phpunit:
11-
name: PHPUnit
10+
pest:
11+
name: Pest
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
@@ -35,8 +35,8 @@ jobs:
3535
- name: Install dependencies
3636
run: composer install --no-progress --prefer-dist --no-interaction
3737

38-
- name: Run PHPUnit
39-
run: composer test
38+
- name: Run Pest
39+
run: ./vendor/bin/pest --ci
4040

4141
php-cs-fixer:
4242
name: PHP CS Fixer

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@
3636
],
3737
"require-dev": {
3838
"friendsofphp/php-cs-fixer": "^3.88",
39-
"phpunit/phpunit": "^11.5"
39+
"phpunit/phpunit": "^11.5",
40+
"pestphp/pest": "^3.8"
4041
},
4142
"scripts": {
4243
"fix": "php-cs-fixer fix --config=.php-cs-fixer.php",
4344
"fix:dry": "php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff",
4445
"fix:ci": "php-cs-fixer fix --config=.php-cs-fixer.php --using-cache=no --dry-run",
4546
"test": "vendor/bin/phpunit --configuration phpunit.xml --colors=always"
47+
},
48+
"config": {
49+
"allow-plugins": {
50+
"pestphp/pest-plugin": true
51+
}
4652
}
4753
}

0 commit comments

Comments
 (0)