diff --git a/includes/core-phpunit/includes/install.php b/includes/core-phpunit/includes/install.php index 8a595903c..4d39db759 100644 --- a/includes/core-phpunit/includes/install.php +++ b/includes/core-phpunit/includes/install.php @@ -40,7 +40,16 @@ require_once ABSPATH . 'wp-settings.php'; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; -require_once ABSPATH . 'wp-includes/class-wpdb.php'; + +/** + * File was renamed in WordPress 6.1. + * + * @see https://core.trac.wordpress.org/ticket/56268 + * @see https://github.com/WordPress/WordPress/commit/8484c7babb6b6ee951f83babea656a294157665d + */ +require_once file_exists( ABSPATH . 'wp-includes/class-wpdb.php' ) + ? ABSPATH . 'wp-includes/class-wpdb.php' + : ABSPATH . 'wp-includes/wp-db.php'; // Override the PHPMailer. global $phpmailer;