How to run PHPunit tests with wp-env?
-
I am trying to run PHPUnit tests for my plugin using wp-env.
The manual setup seems to work:wp-env start
starts up a new environment, I can go to the instance in a browser and everything works.Now I want to run PHPUnit tests for my plugin in this environment, but can’t find any way to do so.
According to the doc – https://developer.www.ads-software.com/block-editor/reference-guides/packages/packages-env/, PHPUnit should be available in all containers, but
wp-env run tests-cli phpunit
fails saying"phpunit": executable file not found in $PATH: unknown
I thought I may need to run
composer install
, but composer install also fails due to missingcomposer.json
.Can anyone please help?
The page I need help with: [log in to see the link]
- The topic ‘How to run PHPunit tests with wp-env?’ is closed to new replies.