From 50c21b4e859a825b5846b28f117ea82383bd5759 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Tue, 27 Aug 2024 13:42:26 -0400 Subject: [PATCH] Tools: Add phpunit test support inside wp-env container --- .wp-env.json | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.wp-env.json b/.wp-env.json index 619729b..0700c0d 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -16,6 +16,7 @@ "wp-content/plugins": "./plugins", "wp-content/themes": "./themes", "wp-content/mu-plugins/0-sandbox.php": "./.env/0-sandbox.php", + "wp-content/phpunit.xml.dist": "./phpunit.xml.dist", "wp-cli.local.yml": "./wp-cli.local.yml" } } diff --git a/package.json b/package.json index a3bacd8..b042480 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "wp-env": "wp-env", "lint:php": "composer lint ./themes/wporg-5ftf ./plugins/wporg-5ftf", "format:php": "composer format ./themes/wporg-5ftf ./plugins/wporg-5ftf", + "test:php": "wp-env run tests-cli ./wp-content/mu-plugins/vendor/bin/phpunit -c ./wp-content/phpunit.xml.dist" }, "workspaces": [ "themes/wporg-5ftf",