|
139 | 139 | "build": "cross-env BABEL_ENV=default NODE_ENV=production webpack", |
140 | 140 | "gettext-strings": "cross-env BABEL_ENV=gettext webpack", |
141 | 141 | "lint": "eslint -f json . | eslines", |
| 142 | + "lint-php": "vendor/bin/phpcs", |
142 | 143 | "predev": "check-node-version --package", |
143 | 144 | "dev": "cross-env BABEL_ENV=default webpack --watch", |
144 | 145 | "test": "npm run lint && npm run test-unit", |
| 146 | + "test-php": "npm run lint-php && npm run test-unit-php", |
145 | 147 | "ci": "concurrently \"npm run lint && npm run build\" \"npm run test-unit:coverage-ci\"", |
146 | 148 | "fixtures:clean": "rimraf \"blocks/test/fixtures/*.+(json|serialized.html)\"", |
147 | | - "fixtures:server-registered": "./bin/get-server-blocks.php > blocks/test/server-registered.json", |
| 149 | + "fixtures:server-registered": "docker-compose -f docker/docker-compose.yml run -w /var/www/html/wp-content/plugins/gutenberg --rm wordpress ./bin/get-server-blocks.php > blocks/test/server-registered.json", |
148 | 150 | "fixtures:generate": "npm run fixtures:server-registered && cross-env GENERATE_MISSING_FIXTURES=y npm run test-unit", |
149 | 151 | "fixtures:regenerate": "npm run fixtures:clean && npm run fixtures:generate", |
150 | 152 | "package-plugin": "./bin/build-plugin-zip.sh", |
151 | 153 | "test-unit": "jest", |
| 154 | + "test-unit-php": "docker-compose -f docker/docker-compose.yml run --rm wordpress_phpunit phpunit", |
| 155 | + "test-unit-php-multisite": "docker-compose -f docker/docker-compose.yml run -e WP_MULTISITE=1 --rm wordpress_phpunit phpunit", |
152 | 156 | "test-unit:coverage": "jest --coverage", |
153 | 157 | "test-unit:coverage-ci": "jest --coverage --maxWorkers 1 && codecov", |
154 | 158 | "test-unit:watch": "jest --watch", |
|
0 commit comments