|
64 | 64 | "sort-packages": true |
65 | 65 | }, |
66 | 66 | "scripts": { |
67 | | - "test": "@php vendor/bin/phpunit", |
68 | | - "test-watcher": "@php vendor/bin/phpunit-watcher watch", |
69 | | - "test-ci": "@php vendor/bin/phpunit", |
| 67 | + "test": "phpunit", |
| 68 | + "test-watcher": [ |
| 69 | + "phpunit-watcher || composer global require spatie/phpunit-watcher --dev", |
| 70 | + "phpunit-watcher watch" |
| 71 | + ], |
70 | 72 | "test-coverage": [ |
71 | 73 | "rm -f clover.xml", |
72 | 74 | "@putenv XDEBUG_MODE=coverage", |
73 | | - "@php vendor/bin/phpunit --coverage-html=coverage --coverage-clover=clover.xml", |
74 | | - "@php vendor/bin/coverage-check clover.xml 100" |
| 75 | + "phpunit --coverage-html=coverage --coverage-clover=clover.xml", |
| 76 | + "coverage-check clover.xml 100" |
| 77 | + ], |
| 78 | + "test-server": [ |
| 79 | + "echo \"Running Test Server\"", |
| 80 | + "@php -S localhost:8000 -t tests/server" |
| 81 | + ], |
| 82 | + "test-server-v2": [ |
| 83 | + "echo \"Running Test Server\"", |
| 84 | + "@php -S localhost:8000 -t tests/server-v2" |
| 85 | + ], |
| 86 | + "test-coverage:win": [ |
| 87 | + "del clover.xml", |
| 88 | + "phpunit --coverage-html=coverage --coverage-clover=clover.xml", |
| 89 | + "coverage-check clover.xml 100" |
75 | 90 | ], |
76 | | - "test-server": "echo \"Running Test Server\" && @php -S localhost:8000 -t tests/server/", |
77 | | - "test-server-v2": "echo \"Running Test Server\" && @php -S localhost:8000 -t tests/server-v2/", |
78 | | - "test-coverage:win": "del clover.xml && phpunit --coverage-html=coverage --coverage-clover=clover.xml && coverage-check clover.xml 100", |
79 | 91 | "test-performance": [ |
80 | 92 | "echo \"Running Performance Tests...\"", |
81 | 93 | "@php -S localhost:8077 -t tests/performance/ > /dev/null 2>&1 & echo $! > server.pid", |
|
86 | 98 | "echo \"Performance Tests Completed.\"" |
87 | 99 | ], |
88 | 100 | "lint": "phpstan --no-progress --memory-limit=256M", |
89 | | - "beautify": "phpcbf --standard=phpcs.xml", |
| 101 | + "beautify": "phpcbf", |
90 | 102 | "phpcs": "phpcs", |
91 | 103 | "post-install-cmd": [ |
92 | | - "php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"", |
93 | | - "php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"", |
94 | | - "php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\"" |
| 104 | + "@php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"", |
| 105 | + "@php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"", |
| 106 | + "@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\"" |
95 | 107 | ] |
96 | 108 | }, |
97 | 109 | "suggest": { |
|
0 commit comments