Make WordPress Core

Changeset 49099 for trunk/package.json


Ignore:
Timestamp:
10/07/2020 01:08:20 PM (5 years ago)
Author:
desrosj
Message:

Build/Test Tools: Add NPM script for using the Composer installed version of PHPUnit.

The test:php NPM script runs the PHP test suite using the system installed version of PHPUnit. In some cases, the version of PHPUnit installed through Composer may be preferred.

Currently, this is true when running the test suite using PHP 8. In order to add support for PHP 8 while maintaining compatibility for PHP 5.6.20, PHPUnit 7.x must be used. But, some modifications are required to be compatible with PHP 8 (see [49037], [48957]).

This change introduces the test:php-composer NPM script, which will run the test suite using the composer installed version.

Props desrosj, SergeyBiryukov.
Fixes #51456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package.json

    r48884 r49099  
    168168        "env:pull": "node ./tools/local-env/scripts/docker.js pull",
    169169        "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit",
     170        "test:php-composer": "node ./tools/local-env/scripts/docker.js run --rm phpunit php ./vendor/bin/phpunit",
    170171        "test:e2e": "node ./tests/e2e/run-tests.js"
    171172    }
Note: See TracChangeset for help on using the changeset viewer.