From 9d2c128667c9cd7bcfb54715752fcfa53b4d19a7 Mon Sep 17 00:00:00 2001 From: Phil Johnston Date: Tue, 6 Jun 2023 15:22:45 -0400 Subject: [PATCH] Fix php unit changes made in wp-env --- package.json | 2 +- phpunit.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4a72826..5921ae3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test:js": "wp-scripts test-unit-js" }, "devDependencies": { - "@wordpress/env": "^7.0.0", + "@wordpress/env": "^8.0.0", "@wordpress/eslint-plugin": "^12.4.0", "@wordpress/jest-preset-default": "^8.1.1", "@wordpress/scripts": "24.0.0" diff --git a/phpunit.sh b/phpunit.sh index 3818906..27b4e6d 100644 --- a/phpunit.sh +++ b/phpunit.sh @@ -14,5 +14,5 @@ sed -i.bak "s/REPLACE_WITH_PLUGIN_DIR_NAME/$plugindirname/g" .wp-env.json npx -p @wordpress/env wp-env start # Run PHPunit inside wp-env, targeting the plugin in question. -npx -p @wordpress/env wp-env run --env-cwd=\"wp-content/wpps-scripts\" tests-wordpress phpunit -c ./phpunit.xml.dist /var/www/html/wp-content/plugins/$plugindirname +npx -p @wordpress/env wp-env run --env-cwd='wp-content/wpps-scripts' tests-wordpress vendor/bin/phpunit -c ./phpunit.xml.dist /var/www/html/wp-content/plugins/$plugindirname