Tests: Fix a PHP notice introduced in [38907].
`WP_DEFAULT_THEME` was being defined in the wrong location. Also, if WordPress has the original "default" theme installed, ensure that our test theme overrides it. Props swissspidy for daring to dive into Themes of WordPress Past. See #31550, #38457. git-svn-id: https://develop.svn.wordpress.org/trunk@38908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ee65fc1f80
commit
94201ff1f5
@ -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' );
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user