diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 089cc59ef1..a5b3ed4908 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -53,7 +53,6 @@ $multisite = $multisite || ( defined( 'MULTISITE' ) && MULTISITE ); require_once( dirname( __FILE__ ) . '/mock-mailer.php' ); $phpmailer = new MockPHPMailer(); -// Set the theme to our special empty theme, to avoid interference from the current Twenty* theme. if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'default' ); } diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index 50efd43bd7..38db3ce55a 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -9,15 +9,14 @@ error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT ); $config_file_path = $argv[1]; $multisite = ! empty( $argv[2] ); +define( 'WP_INSTALLING', true ); +require_once $config_file_path; +require_once dirname( __FILE__ ) . '/functions.php'; + // Set the theme to our special empty theme, to avoid interference from the current Twenty* theme. if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'default' ); } -$wp_theme_directories = array( dirname( __FILE__ ) . '/../data/themedir1' ); - -define( 'WP_INSTALLING', true ); -require_once $config_file_path; -require_once dirname( __FILE__ ) . '/functions.php'; tests_reset__SERVER(); @@ -33,6 +32,8 @@ global $phpmailer; require_once( dirname( __FILE__ ) . '/mock-mailer.php' ); $phpmailer = new MockPHPMailer(); +register_theme_directory( dirname( __FILE__ ) . '/../data/themedir1' ); + /* * default_storage_engine and storage_engine are the same option, but storage_engine * was deprecated in MySQL (and MariaDB) 5.5.3, and removed in 5.7.