diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index eccf49354f..3ea8eb6636 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -72,7 +72,11 @@ $phpmailer = new MockPHPMailer( true ); if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'default' ); } -$wp_theme_directories = array( DIR_TESTDATA . '/themedir1' ); +$wp_theme_directories = array(); + +if ( file_exists( DIR_TESTDATA . '/themedir1' ) ) { + $wp_theme_directories[] = DIR_TESTDATA . '/themedir1'; +} system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path ) . ' ' . $multisite, $retval ); if ( 0 !== $retval ) {