|
19 | 19 | "composer/installers": "^1.0 || ^2.0" |
20 | 20 | }, |
21 | 21 | "require-dev": { |
22 | | - "rector/rector": "^1.2", |
23 | 22 | "automattic/vipwpcs": "^3.0", |
24 | | - "phpcompatibility/phpcompatibility-wp": "^2.1" |
| 23 | + "php-parallel-lint/php-parallel-lint": "^1.0", |
| 24 | + "phpcompatibility/phpcompatibility-wp": "^2.1", |
| 25 | + "phpunit/phpunit": "^9", |
| 26 | + "rector/rector": "^1.2", |
| 27 | + "yoast/wp-test-utils": "^1.2" |
| 28 | + }, |
| 29 | + "autoload-dev": { |
| 30 | + "psr-4": { |
| 31 | + "Automattic\\RewriteRulesInspector\\Tests\\": "tests/" |
| 32 | + } |
25 | 33 | }, |
26 | 34 | "config": { |
27 | 35 | "allow-plugins": { |
|
31 | 39 | "sort-packages": true |
32 | 40 | }, |
33 | 41 | "scripts": { |
34 | | - "i18n": "@php wp i18n make-pot . ./languages/rewrite-rules-inspector.pot" |
| 42 | + "coverage": "@php ./vendor/bin/phpunit --coverage-html ./build/coverage-html", |
| 43 | + "coverage-ci": "@php ./vendor/bin/phpunit", |
| 44 | + "cs": "@php ./vendor/bin/phpcs -q", |
| 45 | + "cs-fix": "@php ./vendor/bin/phpcbf -q", |
| 46 | + "i18n": "@php wp i18n make-pot . ./languages/rewrite-rules-inspector.pot", |
| 47 | + "lint": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git", |
| 48 | + "lint-ci": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git --checkstyle", |
| 49 | + "test:unit": "@php ./vendor/bin/phpunit --testsuite Unit", |
| 50 | + "test:integration": "wp-env run tests-cli --env-cwd=wp-content/plugins/rewrite-rules-inspector ./vendor/bin/phpunit --testsuite WP_Tests", |
| 51 | + "test:integration-ms": "wp-env run tests-cli --env-cwd=wp-content/plugins/rewrite-rules-inspector /bin/bash -c 'WP_MULTISITE=1 ./vendor/bin/phpunit --testsuite WP_Tests'" |
35 | 52 | }, |
36 | 53 | "scripts-descriptions": { |
37 | | - "i18n": "Generate a POT file for translation." |
| 54 | + "coverage": "Run tests with code coverage reporting", |
| 55 | + "coverage-ci": "Run tests with code coverage reporting and send results to stdout", |
| 56 | + "cs": "Run PHP Code Sniffer", |
| 57 | + "cs-fix": "Run PHP Code Sniffer and fix violations", |
| 58 | + "i18n": "Generate a POT file for translation", |
| 59 | + "lint": "Run PHP linting", |
| 60 | + "lint-ci": "Run PHP linting and send results to stdout", |
| 61 | + "test:unit": "Run unit tests", |
| 62 | + "test:integration": "Run integration tests", |
| 63 | + "test:integration-ms": "Run integration tests in multisite mode" |
38 | 64 | } |
39 | 65 | } |
0 commit comments