feat: migrate test suite from PHPUnit to Pest

- Replace phpunit/phpunit with pestphp/pest ^3.0
- Drop scrutinizer/ocular (incompatible with Pest's symfony/console)
- Add tests/Pest.php with MockeryPHPUnitIntegration trait binding
- Extract namespace-level function stubs (config, route, dir) to
  tests/Overrides.php, loaded via autoload-dev files
- Convert all 5 test classes to Pest closure-based syntax:
  setUp() → beforeEach(), assertions → expect(), skip() for skipped tests
- Delete tests/TestCase.php (logic moved to Pest.php)
- Stubs (TokenStub, User) unchanged
This commit is contained in:
Joel Male
2026-02-18 10:38:20 +10:00
parent 8ec2c3cc38
commit 97c04ec693
9 changed files with 426 additions and 830 deletions
+9 -4
View File
@@ -27,9 +27,8 @@
"require-dev": {
"laravel/pint": "^1.2",
"mockery/mockery": "^1.6",
"phpunit/phpunit": "^10.5|^11.0",
"psy/psysh": "^0.12",
"scrutinizer/ocular": "^1.9"
"pestphp/pest": "^3.0",
"psy/psysh": "^0.12"
},
"autoload": {
"psr-4": {
@@ -39,7 +38,10 @@
"autoload-dev": {
"psr-4": {
"Wearepixel\\QuickBooks\\": "tests/"
}
},
"files": [
"tests/Overrides.php"
]
},
"extra": {
"laravel": {
@@ -50,6 +52,9 @@
}
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
},
"sort-packages": true
},
"prefer-stable": true