Merge pull request #707 from flightphp/phpunit-watcher-rework

Add phpunit-watcher for improved testing and customization
master
n0nag0n 17 hours ago committed by GitHub
commit f20f1d2014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

1
.gitignore vendored

@ -13,3 +13,4 @@ phpunit.xml
.runway-config.json
.runway-creds.json
.DS_Store
.phpunit-watcher.yml

@ -56,6 +56,7 @@
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^9.6",
"rregeer/phpunit-coverage-check": "^0.3.1",
"spatie/phpunit-watcher": "^1.23",
"squizlabs/php_codesniffer": "^4.0"
},
"config": {
@ -67,10 +68,7 @@
},
"scripts": {
"test": "phpunit",
"test-watcher": [
"phpunit-watcher || composer global require spatie/phpunit-watcher --dev",
"phpunit-watcher watch"
],
"test-watcher": "phpunit-watcher watch",
"test-coverage": [
"rm -f clover.xml",
"@putenv XDEBUG_MODE=coverage",
@ -105,7 +103,8 @@
"post-install-cmd": [
"@php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"",
"@php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"",
"@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\""
"@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\"",
"@php -r \"if (!file_exists('.phpunit-watcher.yml')) copy('phpunit-watcher.yml', '.phpunit-watcher.yml');\""
]
},
"suggest": {

@ -1,13 +1,13 @@
hideManual: true
watch:
directories:
- tests
- flight
fileMask: '*.php'
notifications:
passingTests: false
failingTests: false
passingTests: false
phpunit:
binaryPath: ./vendor/bin/phpunit
arguments: '--stop-on-failure'
binaryPath: ./vendor/bin/phpunit
timeout: 180
watch:
directories:
- tests
- flight
fileMask: '*.php'

Loading…
Cancel
Save