Make WordPress Core

Changeset 44723


Ignore:
Timestamp:
02/03/2019 10:40:56 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Display a message about currently supported PHPUnit branch to avoid fatal errors on later versions.

See #46149.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r44715 r44723  
    3636require_once $config_file_path;
    3737require_once dirname( __FILE__ ) . '/functions.php';
     38
     39if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) {
     40    printf(
     41        "ERROR: Looks like you're using PHPUnit %s. WordPress is currently only compatible with PHPUnit up to 7.x.\n",
     42        tests_get_phpunit_version()
     43    );
     44    echo "Please use the latest PHPUnit version from the 7.x branch.\n";
     45    exit( 1 );
     46}
    3847
    3948tests_reset__SERVER();
Note: See TracChangeset for help on using the changeset viewer.