Automattic / vip-block-data-api

WordPress plugin that provides an API to retrieve Gutenberg content as structured JSON.
http://wpvip.com
GNU General Public License v3.0
97 stars 7 forks source link

Fix test runner with latest version of wp-env #33

Closed alecgeatches closed 1 year ago

alecgeatches commented 1 year ago

Description

In the latest version of wp-env, the phpunit container was removed in favor of global installation of phpunit. Here is an example failure from this test:

The 'phpunit' container has been removed. Please use 'wp-env run tests-cli --env-cwd=wp-content/path/to/plugin phpunit' instead.

As the error indicates, test commands should be changed to use the tests-cli container instead.

Note that the test-debug command was also removed because debugging will be enabled with the regular test/test-multisite commands if a testing environment is started with wp-env start --xdebug.

Steps to Test

wp-env start
composer install
composer run test
composer run test-multisite