WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/28/2019 02:10:24 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Add support for PHPUnit 7.x.

  • Create an abstract WP_UnitTestCase_Base class to share between PHPUnit 7.x and older versions.
  • Add a speed-trap loader to determine which SpeedTrapListener class needs to be loaded for the current PHPUnit version.
  • Remove unnecessary PHPUnit\Util\Test and PHPUnit_Util_Getopt inheritances.
  • Update Travis CI config to use PHPUnit 7.x for PHP 7.1, 7.2, and nightly PHP versions.

Props jipmoors, netweb, desrosj, ayeshrajans, soulseekah, SergeyBiryukov.
See #43218.

Location:
trunk/tests/phpunit/includes/phpunit6
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/phpunit6/compat.php

    r44700 r44701  
    1616    class_alias( 'PHPUnit\Util\Getopt', 'PHPUnit_Util_Getopt' );
    1717
    18     class PHPUnit_Util_Test extends PHPUnit\Util\Test {
     18    class PHPUnit_Util_Test {
    1919
    2020        public static function getTickets( $className, $methodName ) {
    21             $annotations = self::parseTestMethodAnnotations( $className, $methodName );
     21            $annotations = PHPUnit\Util\Test::parseTestMethodAnnotations( $className, $methodName );
    2222
    2323            $tickets = array();
Note: See TracChangeset for help on using the changeset viewer.