From c8a5a47380f3cc48fcc59d9d63d307cc814171b5 Mon Sep 17 00:00:00 2001 From: Jordan Pakrosnis Date: Tue, 17 Sep 2024 11:09:24 -0700 Subject: [PATCH] Add developer docs section for PHPUnit test execution via wp-env --- docs/developer/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/developer/README.md b/docs/developer/README.md index 5b42ed3ca..bca81917f 100644 --- a/docs/developer/README.md +++ b/docs/developer/README.md @@ -88,6 +88,15 @@ In fact, after the initial setup, you may notice that in your code editor, there ![Development Site Plugins/Themes](../media/gitignore—gatherpress.png) +#### Running PHPUnit Tests (`wp-env`) + +1. Install Node. [NVM](https://github.com/nvm-sh/nvm) is recommended, using `nvm use` in the GatherPress directory before any `npm` command. +2. Install [Composer](https://getcomposer.org/doc/00-intro.md) +3. In your terminal window, `cd` to the `gatherpress` directory +4. Run `npm install` to get node depdendencies +5. Run `composer install` to get PHPUnit dependencies +6. Run `npm run test:unit:php` to execute tests + #### To shut down your development session Simply run: