Tests: use tests-wordpress wp-env for phpunit (#618)

Running tests on the `cli` environment causes coflicts with the `dev`
environment; the tests will log you out, modify the theme, etc.

Running tests on `tests-wordpress` will allow you to run tests along
with the `dev` environment without interference.
This commit is contained in:
Vicente Canales 2024-05-09 09:47:41 -04:00 committed by GitHub
parent 9612377ec0
commit ddc91e2c0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@
"lint:php:fix": "composer run-script format",
"lint:md-docs": "wp-scripts lint-md-docs",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"test:php": "npm run test:php:setup && wp-env run cli --env-cwd='wp-content/plugins/create-block-theme' composer run-script test",
"test:php": "npm run test:php:setup && wp-env run tests-wordpress --env-cwd='wp-content/plugins/create-block-theme' composer run-script test",
"test:php:watch": "wp-env run cli --env-cwd='wp-content/plugins/create-block-theme' composer run-script test:watch",
"test:php:setup": "wp-env start",
"packages-update": "wp-scripts packages-update",