diff --git a/.env b/.env index 30e42fbb3404f..7d7a2c16462ef 100644 --- a/.env +++ b/.env @@ -6,7 +6,6 @@ # # Below, the following substitutions can be made: # - '{version}': any major.minor PHP version from 5.2 onwards. -# - '{phpunit_version}': any major PHPUnit version starting with 4. ## # The site will be available at http://localhost:LOCAL_PORT @@ -18,27 +17,6 @@ LOCAL_DIR=src # The PHP version to use. Valid options are 'latest', and '{version}-fpm'. LOCAL_PHP=8.0-fpm -## -# The PHPUnit version to use when running tests. -# -# Support for new PHPUnit versions is not backported to past versions, so some old WordPress branches require an older -# version to run tests. -# -# Valid versions are: -# - 'latest' for the highest version of PHPUnit supported on the highest version of PHP supported. -# - '{version}-fpm' for the highest version of PHPUnit supported on the specified version of PHP. -# - '{phpunit_version}-php-{version}-fpm' for a specific version of PHPUnit on the specified version of PHP. This format -# is only available for PHP versions 5.6 and higher. -# -# For the full list of available options, see https://hub.docker.com/r/wordpressdevelop/phpunit/tags. -# -# For full documentation on PHPUnit compatibility and WordPress versions, see -# https://make.wordpress.org/core/handbook/references/phpunit-compatibility-and-wordpress-versions/. -# -# This defaults to the value assigned to the value of LOCAL_PHP. -## -LOCAL_PHPUNIT=${LOCAL_PHP} - # Whether or not to enable XDebug. LOCAL_PHP_XDEBUG=false diff --git a/package.json b/package.json index 889f218923f01..92f91ff17dc25 100644 --- a/package.json +++ b/package.json @@ -170,8 +170,7 @@ "env:cli": "node ./tools/local-env/scripts/docker.js run cli", "env:logs": "node ./tools/local-env/scripts/docker.js logs", "env:pull": "node ./tools/local-env/scripts/docker.js pull", - "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit", - "test:php-composer": "node ./tools/local-env/scripts/docker.js run --rm phpunit php ./vendor/bin/phpunit", + "test:php": "node ./tools/local-env/scripts/docker.js run -T php composer update -W && node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit", "test:e2e": "node ./tests/e2e/run-tests.js", "wp-packages-update": "wp-scripts packages-update" }