WordPress.org

Make WordPress Core

Changeset 51559


Ignore:
Timestamp:
08/06/2021 12:33:33 AM (2 months ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Add Composer dependency on the PHPUnit Polyfills package.

The PHPUnit Polyfills package is an add-on for PHPUnit, which works around common issues for writing PHPUnit cross-version compatible tests.

Features:

  • It offers a full set of polyfills for assertions and expectations introduced in PHPUnit since PHPUnit 4.8.
  • It offers two generic TestCases which include these polyfills, but also solve the void return type issue for the fixtures methods.
  • It offers a PHPUnit cross-version solution for the changes to the PHPUnit TestListener implementation.
  • Supports PHPUnit 4.8 – current.
  • Supports and is compatible with PHP 5.4 – current.

The package has no outside dependencies, other than PHPUnit, is actively maintained and endorsed by the maintainer of PHPUnit itself (the only package of its kind which has ever been endorsed).

Props jrf, hellofromTonya, johnbillion, netweb, SergeyBiryukov.
See #46149.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r51544 r51559  
    1818        "wp-coding-standards/wpcs": "~2.3.0",
    1919        "phpcompatibility/phpcompatibility-wp": "~2.1.2",
    20         "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
     20        "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
     21        "yoast/phpunit-polyfills": "^1.0"
    2122    },
    2223    "scripts": {
Note: See TracChangeset for help on using the changeset viewer.