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

See #46149.

git-svn-id: https://develop.svn.wordpress.org/trunk@44723 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-02-03 22:40:56 +00:00
parent 56f305790a
commit 3e19129dc9

View File

@ -36,6 +36,15 @@ if ( ! is_readable( $config_file_path ) ) {
require_once $config_file_path;
require_once dirname( __FILE__ ) . '/functions.php';
if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) {
printf(
"ERROR: Looks like you're using PHPUnit %s. WordPress is currently only compatible with PHPUnit up to 7.x.\n",
tests_get_phpunit_version()
);
echo "Please use the latest PHPUnit version from the 7.x branch.\n";
exit( 1 );
}
tests_reset__SERVER();
define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );